From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <5238AD02.7050703@wwwdotorg.org> Date: Tue, 17 Sep 2013 13:26:58 -0600 From: Stephen Warren MIME-Version: 1.0 Subject: Re: [PATCH v3] PWM: PXA: add device tree support to PWM driver References: <1379091281-23662-1-git-send-email-mikedunn@newsguy.com> <52375FB1.5050700@wwwdotorg.org> <5238621D.3050504@newsguy.com> <52388093.2000401@wwwdotorg.org> <5238A5C2.4080902@newsguy.com> In-Reply-To: <5238A5C2.4080902@newsguy.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-ID: To: Mike Dunn Cc: linux-pwm@vger.kernel.org, Grant Likely , Thierry Reding , Rob Herring , Haojian Zhuang , Robert Jarzmik , Marek Vasut , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Torokhov , Chao Xie , Sergei Shtylyov , Pawel Moll , Mark Rutland , Ian Campbell On 09/17/2013 12:56 PM, Mike Dunn wrote: > On 09/17/2013 09:17 AM, Stephen Warren wrote: >> On 09/17/2013 08:07 AM, Mike Dunn wrote: >>> On 09/16/2013 12:44 PM, Stephen Warren wrote: >>>> On 09/13/2013 10:54 AM, Mike Dunn wrote: >>>>> This patch adds device tree support to the PXA's PWM driver. Only an OF match >>>>> table is added; nothing needs to be extracted from the device tree node. The >>>>> existing ID table is reused for the match table data. >>>>> >>>>> Tested on a Palm Treo 680 (both platform data and DT cases). >>>>> diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi >>>> >>>>> + pwm0: pwm@40b00000 { >>>>> + compatible = "marvell,pxa270-pwm"; >>>> >>>> I thought the assertion was that pax270 and pxa250 were both compatible? >>>> If so, that should be: >>>> >>>> compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; >>> >>> >>> Indeed. Currently, they are all the same. By that logic, shouldn't it be >>> >>> compatible = "marvell,pxa250-pwm", "marvell,pxa270-pwm", "marvell,pxa168-pwm", >>> "marvell,pxa910-pwm"; >> >> compatible should include: >> >> * The exact HW model (so the driver knows exactly which HW is present in >> order to enable any bug quirks). >> * The "first" HW model this HW is compatible with, since this is what >> the driver will bind to (ignoring the possibility of bug quirks). >> >> So, you don't need to include all the values, just two in this case. > > I think I see... and hypothetically, if the the driver must know that it is a > pxa270 in order for it to function correctly due to (hypothetical) hardware > differences, then only the first compatible string should appear? Yes, if the 250 and 270 HW were actually different, then you'd only include one or the other compatible values in the property. From mboxrd@z Thu Jan 1 00:00:00 1970 From: swarren@wwwdotorg.org (Stephen Warren) Date: Tue, 17 Sep 2013 13:26:58 -0600 Subject: [PATCH v3] PWM: PXA: add device tree support to PWM driver In-Reply-To: <5238A5C2.4080902@newsguy.com> References: <1379091281-23662-1-git-send-email-mikedunn@newsguy.com> <52375FB1.5050700@wwwdotorg.org> <5238621D.3050504@newsguy.com> <52388093.2000401@wwwdotorg.org> <5238A5C2.4080902@newsguy.com> Message-ID: <5238AD02.7050703@wwwdotorg.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 09/17/2013 12:56 PM, Mike Dunn wrote: > On 09/17/2013 09:17 AM, Stephen Warren wrote: >> On 09/17/2013 08:07 AM, Mike Dunn wrote: >>> On 09/16/2013 12:44 PM, Stephen Warren wrote: >>>> On 09/13/2013 10:54 AM, Mike Dunn wrote: >>>>> This patch adds device tree support to the PXA's PWM driver. Only an OF match >>>>> table is added; nothing needs to be extracted from the device tree node. The >>>>> existing ID table is reused for the match table data. >>>>> >>>>> Tested on a Palm Treo 680 (both platform data and DT cases). >>>>> diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi >>>> >>>>> + pwm0: pwm at 40b00000 { >>>>> + compatible = "marvell,pxa270-pwm"; >>>> >>>> I thought the assertion was that pax270 and pxa250 were both compatible? >>>> If so, that should be: >>>> >>>> compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; >>> >>> >>> Indeed. Currently, they are all the same. By that logic, shouldn't it be >>> >>> compatible = "marvell,pxa250-pwm", "marvell,pxa270-pwm", "marvell,pxa168-pwm", >>> "marvell,pxa910-pwm"; >> >> compatible should include: >> >> * The exact HW model (so the driver knows exactly which HW is present in >> order to enable any bug quirks). >> * The "first" HW model this HW is compatible with, since this is what >> the driver will bind to (ignoring the possibility of bug quirks). >> >> So, you don't need to include all the values, just two in this case. > > I think I see... and hypothetically, if the the driver must know that it is a > pxa270 in order for it to function correctly due to (hypothetical) hardware > differences, then only the first compatible string should appear? Yes, if the 250 and 270 HW were actually different, then you'd only include one or the other compatible values in the property. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH v3] PWM: PXA: add device tree support to PWM driver Date: Tue, 17 Sep 2013 13:26:58 -0600 Message-ID: <5238AD02.7050703@wwwdotorg.org> References: <1379091281-23662-1-git-send-email-mikedunn@newsguy.com> <52375FB1.5050700@wwwdotorg.org> <5238621D.3050504@newsguy.com> <52388093.2000401@wwwdotorg.org> <5238A5C2.4080902@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5238A5C2.4080902-kFrNdAxtuftBDgjK7y7TUQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mike Dunn Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Grant Likely , Thierry Reding , Rob Herring , Haojian Zhuang , Robert Jarzmik , Marek Vasut , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Dmitry Torokhov , Chao Xie , Sergei Shtylyov , Pawel Moll , Mark Rutland , Ian Campbell List-Id: devicetree@vger.kernel.org On 09/17/2013 12:56 PM, Mike Dunn wrote: > On 09/17/2013 09:17 AM, Stephen Warren wrote: >> On 09/17/2013 08:07 AM, Mike Dunn wrote: >>> On 09/16/2013 12:44 PM, Stephen Warren wrote: >>>> On 09/13/2013 10:54 AM, Mike Dunn wrote: >>>>> This patch adds device tree support to the PXA's PWM driver. Only an OF match >>>>> table is added; nothing needs to be extracted from the device tree node. The >>>>> existing ID table is reused for the match table data. >>>>> >>>>> Tested on a Palm Treo 680 (both platform data and DT cases). >>>>> diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi >>>> >>>>> + pwm0: pwm@40b00000 { >>>>> + compatible = "marvell,pxa270-pwm"; >>>> >>>> I thought the assertion was that pax270 and pxa250 were both compatible? >>>> If so, that should be: >>>> >>>> compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; >>> >>> >>> Indeed. Currently, they are all the same. By that logic, shouldn't it be >>> >>> compatible = "marvell,pxa250-pwm", "marvell,pxa270-pwm", "marvell,pxa168-pwm", >>> "marvell,pxa910-pwm"; >> >> compatible should include: >> >> * The exact HW model (so the driver knows exactly which HW is present in >> order to enable any bug quirks). >> * The "first" HW model this HW is compatible with, since this is what >> the driver will bind to (ignoring the possibility of bug quirks). >> >> So, you don't need to include all the values, just two in this case. > > I think I see... and hypothetically, if the the driver must know that it is a > pxa270 in order for it to function correctly due to (hypothetical) hardware > differences, then only the first compatible string should appear? Yes, if the 250 and 270 HW were actually different, then you'd only include one or the other compatible values in the property. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html