Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1487531 > unrolled thread
| Started by | Jon Hunter <jonathanh@nvidia.com> |
|---|---|
| First post | 2016-09-20 19:20 +0200 |
| Last post | 2016-09-21 11:40 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions Jon Hunter <jonathanh@nvidia.com> - 2016-09-20 19:20 +0200
Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions Paul Kocialkowski <contact@paulk.fr> - 2016-09-20 20:20 +0200
Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions Jon Hunter <jonathanh@nvidia.com> - 2016-09-21 10:00 +0200
Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions Paul Kocialkowski <contact@paulk.fr> - 2016-09-21 10:30 +0200
Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions Jon Hunter <jonathanh@nvidia.com> - 2016-09-21 11:10 +0200
Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions Paul Kocialkowski <contact@paulk.fr> - 2016-09-21 11:40 +0200
| From | Jon Hunter <jonathanh@nvidia.com> |
|---|---|
| Date | 2016-09-20 19:20 +0200 |
| Subject | Re: [PATCH 1/4] ARM: tegra: nyan: Use proper IRQ type definitions |
| Message-ID | <sjwS5-5V7-1@gated-at.bofh.it> |
On 28/08/16 18:32, Paul Kocialkowski wrote:
> This switches a few interrupt definitions that were using
> GPIO_ACTIVE_HIGH as IRQ type, which is invalid.
May be you are right, but this does not describe why this is invalid.
Can you elaborate?
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
> arch/arm/boot/dts/tegra124-nyan.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
> index 271505e..30a77ec 100644
> --- a/arch/arm/boot/dts/tegra124-nyan.dtsi
> +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
> @@ -59,7 +59,7 @@
> compatible = "maxim,max98090";
> reg = <0x10>;
> interrupt-parent = <&gpio>;
> - interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
> + interrupts = <TEGRA_GPIO(H, 4) IRQ_TYPE_EDGE_FALLING>;
If this in invalid then the DT binding doc for the max98090 should be
updated as well.
> };
>
> temperature-sensor@4c {
> @@ -325,7 +325,7 @@
> reg = <0x9>;
> interrupt-parent = <&gpio>;
> interrupts = <TEGRA_GPIO(J, 0)
> - GPIO_ACTIVE_HIGH>;
> + IRQ_TYPE_EDGE_BOTH>;
> ti,ac-detect-gpios = <&gpio
> TEGRA_GPIO(J, 0)
> GPIO_ACTIVE_HIGH>;
>
Cheers
Jon
--
nvpublic
[toc] | [next] | [standalone]
| From | Paul Kocialkowski <contact@paulk.fr> |
|---|---|
| Date | 2016-09-20 20:20 +0200 |
| Message-ID | <sjxO9-6z2-11@gated-at.bofh.it> |
| In reply to | #1487531 |
[Multipart message — attachments visible in raw view] — view raw
Le mardi 20 septembre 2016 à 18:15 +0100, Jon Hunter a écrit :
> On 28/08/16 18:32, Paul Kocialkowski wrote:
> >
> > This switches a few interrupt definitions that were using
> > GPIO_ACTIVE_HIGH as IRQ type, which is invalid.
>
> May be you are right, but this does not describe why this is invalid.
> Can you elaborate?
GPIO_ACTIVE_HIGH is simply not the right kind of define to use in the
"interrupts" devicetree property. Values provided there are understood as
IRQ_TYPE_ defines.
Also, a similar commit[0] was pushed to the cros kernel tree.
Cheers,
[0]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f77288938d571b48c9736ac3703cea370c002434
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > ---
> > arch/arm/boot/dts/tegra124-nyan.dtsi | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi
> > b/arch/arm/boot/dts/tegra124-nyan.dtsi
> > index 271505e..30a77ec 100644
> > --- a/arch/arm/boot/dts/tegra124-nyan.dtsi
> > +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
> > @@ -59,7 +59,7 @@
> > compatible = "maxim,max98090";
> > reg = <0x10>;
> > interrupt-parent = <&gpio>;
> > - interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
> > + interrupts = <TEGRA_GPIO(H, 4)
> > IRQ_TYPE_EDGE_FALLING>;
>
> If this in invalid then the DT binding doc for the max98090 should be
> updated as well.
>
> >
> > };
> >
> > temperature-sensor@4c {
> > @@ -325,7 +325,7 @@
> > reg = <0x9>;
> > interrupt-parent = <&gpio>;
> > interrupts = <TEGRA_GPIO(J, 0)
> > - GPIO_ACTIVE_HIGH>;
> > + IRQ_TYPE_EDGE_BOTH>
> > ;
> > ti,ac-detect-gpios = <&gpio
> > TEGRA_GPIO(J, 0)
> > GPIO_ACTIVE_HIGH>;
> >
>
> Cheers
> Jon
>
--
Paul Kocialkowski, developer of low-level free software for embedded devices
Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
[toc] | [prev] | [next] | [standalone]
| From | Jon Hunter <jonathanh@nvidia.com> |
|---|---|
| Date | 2016-09-21 10:00 +0200 |
| Message-ID | <sjKBI-6bG-31@gated-at.bofh.it> |
| In reply to | #1487560 |
On 20/09/16 19:14, Paul Kocialkowski wrote: > * PGP Signed by an unknown key > > Le mardi 20 septembre 2016 à 18:15 +0100, Jon Hunter a écrit : >> On 28/08/16 18:32, Paul Kocialkowski wrote: >>> >>> This switches a few interrupt definitions that were using >>> GPIO_ACTIVE_HIGH as IRQ type, which is invalid. >> >> May be you are right, but this does not describe why this is invalid. >> Can you elaborate? > > GPIO_ACTIVE_HIGH is simply not the right kind of define to use in the > "interrupts" devicetree property. Values provided there are understood as > IRQ_TYPE_ defines. Right, but you are changing the type as GPIO_ACTIVE_HIGH = 0 and IRQ_TYPE_EDGE_FALLING = 2 and there is no comment about why this has been changed. It might be correct, but you need to explain it. Jon -- nvpublic
[toc] | [prev] | [next] | [standalone]
| From | Paul Kocialkowski <contact@paulk.fr> |
|---|---|
| Date | 2016-09-21 10:30 +0200 |
| Message-ID | <sjL4J-6Cq-15@gated-at.bofh.it> |
| In reply to | #1487884 |
[Multipart message — attachments visible in raw view] — view raw
Le mercredi 21 septembre 2016 à 08:52 +0100, Jon Hunter a écrit : > On 20/09/16 19:14, Paul Kocialkowski wrote: > > > > * PGP Signed by an unknown key > > > > Le mardi 20 septembre 2016 à 18:15 +0100, Jon Hunter a écrit : > > > > > > On 28/08/16 18:32, Paul Kocialkowski wrote: > > > > > > > > > > > > This switches a few interrupt definitions that were using > > > > GPIO_ACTIVE_HIGH as IRQ type, which is invalid. > > > > > > May be you are right, but this does not describe why this is invalid. > > > Can you elaborate? > > > > GPIO_ACTIVE_HIGH is simply not the right kind of define to use in the > > "interrupts" devicetree property. Values provided there are understood as > > IRQ_TYPE_ defines. > > Right, but you are changing the type as GPIO_ACTIVE_HIGH = 0 and > IRQ_TYPE_EDGE_FALLING = 2 and there is no comment about why this has > been changed. It might be correct, but you need to explain it. This actually makes the IRQ trigger values consistent with the drivers, that define them regardless of devicetree anyway. The max98090 driver has IRQF_TRIGGER_FALLING and bq24735 has IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING. This is really more of a cosmetic change, it doesn't impact actual use. -- Paul Kocialkowski, developer of low-level free software for embedded devices Website: https://www.paulk.fr/ Coding blog: https://code.paulk.fr/ Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
[toc] | [prev] | [next] | [standalone]
| From | Jon Hunter <jonathanh@nvidia.com> |
|---|---|
| Date | 2016-09-21 11:10 +0200 |
| Message-ID | <sjLHs-74R-21@gated-at.bofh.it> |
| In reply to | #1487908 |
On 21/09/16 09:26, Paul Kocialkowski wrote: > * PGP Signed by an unknown key > > Le mercredi 21 septembre 2016 à 08:52 +0100, Jon Hunter a écrit : >> On 20/09/16 19:14, Paul Kocialkowski wrote: >>> >>>> Old Signed by an unknown key >>> >>> Le mardi 20 septembre 2016 à 18:15 +0100, Jon Hunter a écrit : >>>> >>>> On 28/08/16 18:32, Paul Kocialkowski wrote: >>>>> >>>>> >>>>> This switches a few interrupt definitions that were using >>>>> GPIO_ACTIVE_HIGH as IRQ type, which is invalid. >>>> >>>> May be you are right, but this does not describe why this is invalid. >>>> Can you elaborate? >>> >>> GPIO_ACTIVE_HIGH is simply not the right kind of define to use in the >>> "interrupts" devicetree property. Values provided there are understood as >>> IRQ_TYPE_ defines. >> >> Right, but you are changing the type as GPIO_ACTIVE_HIGH = 0 and >> IRQ_TYPE_EDGE_FALLING = 2 and there is no comment about why this has >> been changed. It might be correct, but you need to explain it. > > This actually makes the IRQ trigger values consistent with the drivers, that > define them regardless of devicetree anyway. The max98090 driver > has IRQF_TRIGGER_FALLING and bq24735 has IRQF_TRIGGER_RISING | > IRQF_TRIGGER_FALLING. > > This is really more of a cosmetic change, it doesn't impact actual use. So you are saying that the drivers don't actually use the DT types? May be that is ok, and yes this is cosmetic, but this should be stated in the changelog as it is not clear what is going on here. Cheers Jon -- nvpublic
[toc] | [prev] | [next] | [standalone]
| From | Paul Kocialkowski <contact@paulk.fr> |
|---|---|
| Date | 2016-09-21 11:40 +0200 |
| Message-ID | <sjMau-7eL-15@gated-at.bofh.it> |
| In reply to | #1487925 |
[Multipart message — attachments visible in raw view] — view raw
Resending with the right CC chain. Le mercredi 21 septembre 2016 à 10:06 +0100, Jon Hunter a écrit : > On 21/09/16 09:26, Paul Kocialkowski wrote: > > > > > > * PGP Signed by an unknown key > > > > Le mercredi 21 septembre 2016 à 08:52 +0100, Jon Hunter a écrit : > > > > > > > > > On 20/09/16 19:14, Paul Kocialkowski wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > Old Signed by an unknown key > > > > > > > > Le mardi 20 septembre 2016 à 18:15 +0100, Jon Hunter a écrit : > > > > > > > > > > > > > > > > > > > > On 28/08/16 18:32, Paul Kocialkowski wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This switches a few interrupt definitions that were using > > > > > > GPIO_ACTIVE_HIGH as IRQ type, which is invalid. > > > > > > > > > > May be you are right, but this does not describe why this is invalid. > > > > > Can you elaborate? > > > > > > > > GPIO_ACTIVE_HIGH is simply not the right kind of define to use in the > > > > "interrupts" devicetree property. Values provided there are understood > > > > as > > > > IRQ_TYPE_ defines. > > > > > > Right, but you are changing the type as GPIO_ACTIVE_HIGH = 0 and > > > IRQ_TYPE_EDGE_FALLING = 2 and there is no comment about why this has > > > been changed. It might be correct, but you need to explain it. > > > > This actually makes the IRQ trigger values consistent with the drivers, that > > define them regardless of devicetree anyway. The max98090 driver > > has IRQF_TRIGGER_FALLING and bq24735 has IRQF_TRIGGER_RISING | > > IRQF_TRIGGER_FALLING. > > > > This is really more of a cosmetic change, it doesn't impact actual use. > > So you are saying that the drivers don't actually use the DT types? It appears so. At least they are hardcoded in the kernel driver. > > May be that is ok, and yes this is cosmetic, but this should be stated in > the changelog as it is not clear what is going on here. Fair enough, will do in v2. -- Paul Kocialkowski, developer of low-level free software for embedded devices Website: https://www.paulk.fr/ Coding blog: https://code.paulk.fr/ Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web