diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-10-03 17:22:39 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-10-06 16:59:08 +0200 |
commit | e9636255d1a151de8903e952f64ed779e832f613 (patch) | |
tree | c466a17cdc371e9045d47de8d86c4c227b8b4f6e /drivers/gpio/gpio-apalis-tk1-k20.c | |
parent | 795eccdb989221b0d9ff32a34cd0f7127db89860 (diff) |
mfd: apalis-tk1-k20: clean-up and fix support for 0.10 k20 fwApalis-TK1_LXDE-Image_2.7b4-20171007
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'drivers/gpio/gpio-apalis-tk1-k20.c')
-rw-r--r-- | drivers/gpio/gpio-apalis-tk1-k20.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-apalis-tk1-k20.c b/drivers/gpio/gpio-apalis-tk1-k20.c index 0061625ac0f4..f914cf0d8ded 100644 --- a/drivers/gpio/gpio-apalis-tk1-k20.c +++ b/drivers/gpio/gpio-apalis-tk1-k20.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 Toradex AG + * Copyright 2016-2017 Toradex AG * Dominik Sliwa <dominik.sliwa@toradex.com> * * This program is free software; you can redistribute it and/or modify it under @@ -19,7 +19,8 @@ struct apalis_tk1_k20_gpio { struct apalis_tk1_k20_regmap *apalis_tk1_k20; }; -static int apalis_tk1_k20_gpio_input(struct gpio_chip *chip, unsigned offset) +static int apalis_tk1_k20_gpio_input(struct gpio_chip *chip, + unsigned int offset) { struct apalis_tk1_k20_gpio *gpio = container_of(chip, struct apalis_tk1_k20_gpio, chip); @@ -36,8 +37,9 @@ static int apalis_tk1_k20_gpio_input(struct gpio_chip *chip, unsigned offset) return 0; } -static int apalis_tk1_k20_gpio_output(struct gpio_chip *chip, unsigned offset, - int value) +static int apalis_tk1_k20_gpio_output(struct gpio_chip *chip, + unsigned int offset, + int value) { struct apalis_tk1_k20_gpio *gpio = container_of(chip, struct apalis_tk1_k20_gpio, chip); @@ -57,7 +59,7 @@ static int apalis_tk1_k20_gpio_output(struct gpio_chip *chip, unsigned offset, return 0; } -static int apalis_tk1_k20_gpio_get(struct gpio_chip *chip, unsigned offset) +static int apalis_tk1_k20_gpio_get(struct gpio_chip *chip, unsigned int offset) { struct apalis_tk1_k20_gpio *gpio = container_of(chip, struct apalis_tk1_k20_gpio, chip); @@ -79,13 +81,15 @@ static int apalis_tk1_k20_gpio_get(struct gpio_chip *chip, unsigned offset) return value ? 1 : 0; } -static int apalis_tk1_k20_gpio_request(struct gpio_chip *chip, unsigned offset) +static int apalis_tk1_k20_gpio_request(struct gpio_chip *chip, + unsigned int offset) { struct apalis_tk1_k20_gpio *gpio = container_of(chip, struct apalis_tk1_k20_gpio, chip); int status = 0; - dev_dbg(gpio->apalis_tk1_k20->dev, "APALIS TK1 K20 GPIO %s\n",__func__); + dev_dbg(gpio->apalis_tk1_k20->dev, "APALIS TK1 K20 GPIO %s\n", + __func__); apalis_tk1_k20_lock(gpio->apalis_tk1_k20); @@ -102,10 +106,11 @@ static int apalis_tk1_k20_gpio_request(struct gpio_chip *chip, unsigned offset) return status; } -static void apalis_tk1_k20_gpio_free(struct gpio_chip *chip, unsigned offset) +static void apalis_tk1_k20_gpio_free(struct gpio_chip *chip, + unsigned int offset) { - struct apalis_tk1_k20_gpio *gpio = container_of(chip, - struct apalis_tk1_k20_gpio, chip); + struct apalis_tk1_k20_gpio *gpio = + container_of(chip, struct apalis_tk1_k20_gpio, chip); apalis_tk1_k20_lock(gpio->apalis_tk1_k20); @@ -118,7 +123,7 @@ static void apalis_tk1_k20_gpio_free(struct gpio_chip *chip, unsigned offset) } -static void apalis_tk1_k20_gpio_set(struct gpio_chip *chip, unsigned offset, +static void apalis_tk1_k20_gpio_set(struct gpio_chip *chip, unsigned int offset, int value) { struct apalis_tk1_k20_gpio *gpio = container_of(chip, |