Lines Matching defs:chip
23 * @chip: gpio_chip instance to be worked on
31 static int modepin_gpio_get_value(struct gpio_chip *chip, unsigned int pin)
51 * @chip: gpio_chip instance to be worked on
60 static void modepin_gpio_set_value(struct gpio_chip *chip, unsigned int pin,
84 * @chip: gpio_chip instance to be worked on
89 static int modepin_gpio_dir_in(struct gpio_chip *chip, unsigned int pin)
96 * @chip: gpio_chip instance to be worked on
102 static int modepin_gpio_dir_out(struct gpio_chip *chip, unsigned int pin,
116 struct gpio_chip *chip;
119 chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
120 if (!chip)
123 platform_set_drvdata(pdev, chip);
125 /* configure the gpio chip */
126 chip->base = -1;
127 chip->ngpio = MODE_PINS;
128 chip->owner = THIS_MODULE;
129 chip->parent = &pdev->dev;
130 chip->get = modepin_gpio_get_value;
131 chip->set = modepin_gpio_set_value;
132 chip->direction_input = modepin_gpio_dir_in;
133 chip->direction_output = modepin_gpio_dir_out;
134 chip->label = dev_name(&pdev->dev);
137 status = devm_gpiochip_add_data(&pdev->dev, chip, chip);
140 "Failed to add GPIO chip\n");