mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-08 19:56:24 -04:00
platform/x86: int0002: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-platform-x86-v1-2-6f67e76a722c@linaro.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
committed by
Ilpo Järvinen
parent
29ba3b6037
commit
e0071ad2ee
@@ -65,9 +65,10 @@ static int int0002_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void int0002_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
static int int0002_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int int0002_gpio_direction_output(struct gpio_chip *chip,
|
||||
@@ -192,7 +193,7 @@ static int int0002_probe(struct platform_device *pdev)
|
||||
chip->parent = dev;
|
||||
chip->owner = THIS_MODULE;
|
||||
chip->get = int0002_gpio_get;
|
||||
chip->set = int0002_gpio_set;
|
||||
chip->set_rv = int0002_gpio_set;
|
||||
chip->direction_input = int0002_gpio_get;
|
||||
chip->direction_output = int0002_gpio_direction_output;
|
||||
chip->base = -1;
|
||||
|
||||
Reference in New Issue
Block a user