All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH 0/4] Add AXP209 GPIO driver
Date: Wed, 9 Mar 2016 16:28:22 +0100	[thread overview]
Message-ID: <20160309152822.GQ8418@lukather> (raw)
In-Reply-To: <56E0146E.6050102-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

Hi,

On Wed, Mar 09, 2016 at 01:17:50PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 09-03-16 11:50, Maxime Ripard wrote:
> >Hi,
> >
> >The axp209 PMIC used in combination to some Allwinner SoCs has a bunch
> >of GPIOs accessible. Some boards use these to control their backlight
> >or a few LEDs.
> 
> Thanks for working on this, but IMHO this cannot go upstream like this,
> the gpio pins on the axp pmics need a pinctrl driver, not a gpio
> driver. I.E. on the axp209 gpio0 and gpio1 can also be used to output
> an additional low-noise ldo (so as a regulator), or as an adc input.

Eventually, yes, it needs both. But they don't even have to be the
same driver, since they provide two different features. The only
reason we have that construct in the pio case is because they share
the same address space, but in the AXP case, the regmap and our mfd
take care of that already.

> I've been working on gsl1680 touchscreen support lately and on at least
> a few a23 tablets, the low-noise ldo is used as AVCC for the touchscreen
> controller.

Yeah, the AXP209 also has an ADC connected to these pins.

> Now these use an axp223 pmic, but nothing is stopping someone from
> doing something similar with an axp209 and I think it would be best
> to support this from day one, rather then hope we can retro-fit this
> later without breaking dts.

I considered that, but I don't see how it would break the DT later. If
someone wants to enable say the ADC, he will of course have to add the
pinctrl driver, and the pinctrl handles, but the old DT will only
reference the gpio driver directly, which would still be something
that would work.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Lee Jones <lee.jones@linaro.org>, Chen-Yu Tsai <wens@csie.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH 0/4] Add AXP209 GPIO driver
Date: Wed, 9 Mar 2016 16:28:22 +0100	[thread overview]
Message-ID: <20160309152822.GQ8418@lukather> (raw)
In-Reply-To: <56E0146E.6050102@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]

Hi,

On Wed, Mar 09, 2016 at 01:17:50PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 09-03-16 11:50, Maxime Ripard wrote:
> >Hi,
> >
> >The axp209 PMIC used in combination to some Allwinner SoCs has a bunch
> >of GPIOs accessible. Some boards use these to control their backlight
> >or a few LEDs.
> 
> Thanks for working on this, but IMHO this cannot go upstream like this,
> the gpio pins on the axp pmics need a pinctrl driver, not a gpio
> driver. I.E. on the axp209 gpio0 and gpio1 can also be used to output
> an additional low-noise ldo (so as a regulator), or as an adc input.

Eventually, yes, it needs both. But they don't even have to be the
same driver, since they provide two different features. The only
reason we have that construct in the pio case is because they share
the same address space, but in the AXP case, the regmap and our mfd
take care of that already.

> I've been working on gsl1680 touchscreen support lately and on at least
> a few a23 tablets, the low-noise ldo is used as AVCC for the touchscreen
> controller.

Yeah, the AXP209 also has an ADC connected to these pins.

> Now these use an axp223 pmic, but nothing is stopping someone from
> doing something similar with an axp209 and I think it would be best
> to support this from day one, rather then hope we can retro-fit this
> later without breaking dts.

I considered that, but I don't see how it would break the DT later. If
someone wants to enable say the ADC, he will of course have to add the
pinctrl driver, and the pinctrl handles, but the old DT will only
reference the gpio driver directly, which would still be something
that would work.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] Add AXP209 GPIO driver
Date: Wed, 9 Mar 2016 16:28:22 +0100	[thread overview]
Message-ID: <20160309152822.GQ8418@lukather> (raw)
In-Reply-To: <56E0146E.6050102@redhat.com>

Hi,

On Wed, Mar 09, 2016 at 01:17:50PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 09-03-16 11:50, Maxime Ripard wrote:
> >Hi,
> >
> >The axp209 PMIC used in combination to some Allwinner SoCs has a bunch
> >of GPIOs accessible. Some boards use these to control their backlight
> >or a few LEDs.
> 
> Thanks for working on this, but IMHO this cannot go upstream like this,
> the gpio pins on the axp pmics need a pinctrl driver, not a gpio
> driver. I.E. on the axp209 gpio0 and gpio1 can also be used to output
> an additional low-noise ldo (so as a regulator), or as an adc input.

Eventually, yes, it needs both. But they don't even have to be the
same driver, since they provide two different features. The only
reason we have that construct in the pio case is because they share
the same address space, but in the AXP case, the regmap and our mfd
take care of that already.

> I've been working on gsl1680 touchscreen support lately and on at least
> a few a23 tablets, the low-noise ldo is used as AVCC for the touchscreen
> controller.

Yeah, the AXP209 also has an ADC connected to these pins.

> Now these use an axp223 pmic, but nothing is stopping someone from
> doing something similar with an axp209 and I think it would be best
> to support this from day one, rather then hope we can retro-fit this
> later without breaking dts.

I considered that, but I don't see how it would break the DT later. If
someone wants to enable say the ADC, he will of course have to add the
pinctrl driver, and the pinctrl handles, but the old DT will only
reference the gpio driver directly, which would still be something
that would work.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160309/60776cb9/attachment.sig>

  parent reply	other threads:[~2016-03-09 15:28 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 10:50 [PATCH 0/4] Add AXP209 GPIO driver Maxime Ripard
2016-03-09 10:50 ` Maxime Ripard
2016-03-09 10:50 ` Maxime Ripard
     [not found] ` <1457520614-32239-1-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-03-09 10:50   ` [PATCH 1/4] gpio: " Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
     [not found]     ` <1457520614-32239-2-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-03-09 13:07       ` kbuild test robot
2016-03-09 13:07         ` kbuild test robot
2016-03-09 13:07         ` kbuild test robot
2016-03-09 13:20       ` Peter Korsgaard
2016-03-09 13:20         ` [linux-sunxi] " Peter Korsgaard
2016-03-09 13:20         ` Peter Korsgaard
     [not found]         ` <87io0v23fz.fsf-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
2016-03-16  9:57           ` Linus Walleij
2016-03-16  9:57             ` Linus Walleij
2016-03-16  9:57             ` Linus Walleij
2016-03-16  9:56       ` Linus Walleij
2016-03-16  9:56         ` Linus Walleij
2016-03-16  9:56         ` Linus Walleij
2016-03-17 19:10       ` Rob Herring
2016-03-17 19:10         ` Rob Herring
2016-03-17 19:10         ` Rob Herring
2016-03-09 10:50   ` [PATCH 2/4] mfd: axp20x: Add AXP209 GPIO driver to the mfd Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
     [not found]     ` <1457520614-32239-3-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-03-16 10:03       ` Linus Walleij
2016-03-16 10:03         ` Linus Walleij
2016-03-16 10:03         ` Linus Walleij
2016-03-21 11:54       ` Lee Jones
2016-03-21 11:54         ` Lee Jones
2016-03-21 11:54         ` Lee Jones
2016-03-29  9:58         ` Maxime Ripard
2016-03-29  9:58           ` Maxime Ripard
2016-03-29  9:58           ` Maxime Ripard
2016-03-29 10:10           ` Lee Jones
2016-03-29 10:10             ` Lee Jones
2016-03-29 10:10             ` Lee Jones
2016-03-09 10:50   ` [PATCH 3/4] ARM: dt: axp209: Add AXP209 GPIO driver Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
     [not found]     ` <1457520614-32239-4-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-03-16 10:04       ` Linus Walleij
2016-03-16 10:04         ` Linus Walleij
2016-03-16 10:04         ` Linus Walleij
2016-03-09 10:50   ` [PATCH 4/4] ARM: sun5i: chip: Add status LED Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
2016-03-09 10:50     ` Maxime Ripard
2016-03-09 12:17 ` [PATCH 0/4] Add AXP209 GPIO driver Hans de Goede
2016-03-09 12:17   ` Hans de Goede
     [not found]   ` <56E0146E.6050102-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-09 15:28     ` Maxime Ripard [this message]
2016-03-09 15:28       ` Maxime Ripard
2016-03-09 15:28       ` Maxime Ripard
2016-03-09 15:44       ` [linux-sunxi] " Hans de Goede
2016-03-09 15:44         ` Hans de Goede
     [not found]         ` <56E044C1.7080300-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-16 10:10           ` Linus Walleij
2016-03-16 10:10             ` Linus Walleij
2016-03-16 10:10             ` Linus Walleij
2016-03-16 10:38             ` Hans de Goede
2016-03-16 10:38               ` Hans de Goede
2016-03-16 10:38               ` Hans de Goede
2016-03-22  7:22         ` Maxime Ripard
2016-03-22  7:22           ` Maxime Ripard
2016-03-22  7:33           ` Chen-Yu Tsai
2016-03-22  7:33             ` [linux-sunxi] " Chen-Yu Tsai
2016-03-22  7:33             ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160309152822.GQ8418@lukather \
    --to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.