Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1528409 > unrolled thread
| Started by | Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|---|
| First post | 2016-11-23 14:40 +0100 |
| Last post | 2016-11-24 07:00 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/2] add support for AXP209 GPIOs functions Quentin Schulz <quentin.schulz@free-electrons.com> - 2016-11-23 14:40 +0100
[PATCH 1/2] gpio: axp209: use correct register for GPIO input status Quentin Schulz <quentin.schulz@free-electrons.com> - 2016-11-23 14:40 +0100
Re: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-11-23 14:50 +0100
Re: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status Chen-Yu Tsai <wens@csie.org> - 2016-11-24 07:00 +0100
| From | Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|---|
| Date | 2016-11-23 14:40 +0100 |
| Subject | [PATCH 0/2] add support for AXP209 GPIOs functions |
| Message-ID | <sGFWi-5vy-25@gated-at.bofh.it> |
The AXP209 PMIC has three GPIOs. Two of them can be muxed in other modes
(namely adc or regulator)[1] which cannot be used while the pin is in one
of GPIO modes.
This adds the possibility to use all functions of the GPIOs present in
the AXP209 PMIC thanks to the pinctrl subsystem.
An upcoming ADC driver for the AXP209 PMIC will make use of this pinctrl to
read ADC values of GPIO0 and GPIO1. At the moment, no driver is pinctrling
these GPIOs.
This patch also corrects the register used to read GPIO input status.
[1] see registers 90H, 92H and 93H at
http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf
Quentin Schulz (2):
gpio: axp209: use correct register for GPIO input status
gpio: axp209: add pinctrl support
.../devicetree/bindings/gpio/gpio-axp209.txt | 28 +-
drivers/gpio/gpio-axp209.c | 557 ++++++++++++++++++---
2 files changed, 504 insertions(+), 81 deletions(-)
--
2.9.3
[toc] | [next] | [standalone]
| From | Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|---|
| Date | 2016-11-23 14:40 +0100 |
| Subject | [PATCH 1/2] gpio: axp209: use correct register for GPIO input status |
| Message-ID | <sGFWi-5vy-33@gated-at.bofh.it> |
| In reply to | #1528409 |
The GPIO input status was read from control register
(AXP20X_GPIO[210]_CTRL) instead of status register (AXP20X_GPIO20_SS).
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
---
drivers/gpio/gpio-axp209.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-axp209.c b/drivers/gpio/gpio-axp209.c
index d9c2a51..4a346b7 100644
--- a/drivers/gpio/gpio-axp209.c
+++ b/drivers/gpio/gpio-axp209.c
@@ -64,13 +64,9 @@ static int axp20x_gpio_get(struct gpio_chip *chip, unsigned offset)
{
struct axp20x_gpio *gpio = gpiochip_get_data(chip);
unsigned int val;
- int reg, ret;
-
- reg = axp20x_gpio_get_reg(offset);
- if (reg < 0)
- return reg;
+ int ret;
- ret = regmap_read(gpio->regmap, reg, &val);
+ ret = regmap_read(gpio->regmap, AXP20X_GPIO20_SS, &val);
if (ret)
return ret;
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
|---|---|
| Date | 2016-11-23 14:50 +0100 |
| Subject | Re: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status |
| Message-ID | <sGG5X-5zw-35@gated-at.bofh.it> |
| In reply to | #1528410 |
Hello, On Wed, 23 Nov 2016 14:27:48 +0100, Quentin Schulz wrote: > The GPIO input status was read from control register > (AXP20X_GPIO[210]_CTRL) instead of status register (AXP20X_GPIO20_SS). > > Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> This smells like a bug fix, so perhaps Cc: stable? Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Date | 2016-11-24 07:00 +0100 |
| Subject | Re: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status |
| Message-ID | <sGVeF-6OY-5@gated-at.bofh.it> |
| In reply to | #1528422 |
On Wed, Nov 23, 2016 at 9:45 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Hello, > > On Wed, 23 Nov 2016 14:27:48 +0100, Quentin Schulz wrote: >> The GPIO input status was read from control register >> (AXP20X_GPIO[210]_CTRL) instead of status register (AXP20X_GPIO20_SS). >> >> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> > > This smells like a bug fix, so perhaps Cc: stable? Presently there are no in-tree boards that use the GPIOs as input. And the only user I see is the CHIP, for the headphone jack detection. Again, not supported in mainline yet. Not sure if there is value in sending it for stable. ChenYu > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web