mbox series

[v2,0/5] mfd: stmpe: Probe sub-function by compatible

Message ID 20220712163345.445811-1-francesco.dolcini@toradex.com
Headers show
Series mfd: stmpe: Probe sub-function by compatible | expand

Message

Francesco Dolcini July 12, 2022, 4:33 p.m. UTC
Hi all,
This series update the STMPE MFD driver to use of_compatible to probe for
sub-functions instead of using hardcoded names.  Matching by name does not seems
in general a good idea, in this specific case it is even worst since the node
name are not compliant to the current naming convention (they are not generic
and they do include underscores), and because of that recently
we had a regression introduced [1].

This change was suggested by Ahmad Fatoum [2].

[1] commit 56086b5e ("ARM: dts: imx6qdl-apalis: Avoid underscore in node name")
[2] https://lore.kernel.org/all/86815346-209e-304e-3565-b4160afa48e8@pengutronix.de/

Changes in v2:
 - split in a separate patch the removal of rotator from probe
 - remove define usage for compatible strings

Francesco Dolcini (5):
  mfd: stmpe: Remove rotator block from probe
  mfd: stmpe: Probe sub-function by compatible
  dt-bindings: gpio: stmpe: Remove node name requirement
  dt-bindings: iio: adc: stmpe: Remove node name requirement
  dt-bindings: input: touchscreen: stmpe: Remove node name requirement

 .../devicetree/bindings/gpio/gpio-stmpe.txt         |  3 +--
 .../devicetree/bindings/iio/adc/st,stmpe-adc.yaml   |  3 +--
 .../devicetree/bindings/input/touchscreen/stmpe.txt |  3 +--
 drivers/mfd/stmpe.c                                 | 13 +++++--------
 4 files changed, 8 insertions(+), 14 deletions(-)

Comments

Jonathan Cameron Aug. 13, 2022, 3:05 p.m. UTC | #1
On Tue, 9 Aug 2022 16:37:27 +0100
Lee Jones <lee.jones@linaro.org> wrote:

> On Tue, 09 Aug 2022, Francesco Dolcini wrote:
> 
> > Hello Jonathan, can you pick this? Patches 1 and 2 were applied to MFD
> > tree.  
> 
> Sending out nags whilst the merge-window is open is seldom helpful.

Agreed, next week would have been better.  I happen to be queuing stuff
up ready for a rebase this cycle though so applied this one to what will
be the togreg branch of iio.git after rc1 is available and I've rebased.

Jonathan

> 
> Also, please refrain from top-posting.
> 
> Thanks.
> 
> > On Tue, Jul 12, 2022 at 06:33:44PM +0200, Francesco Dolcini wrote:  
> > > STMPE driver does not require a specific node name anymore, only the
> > > compatible is checked, update binding according to this.
> > > 
> > > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> > > ---
> > >  Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml | 3 +--
> > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml
> > > index 9049c699152f..333744a2159c 100644
> > > --- a/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml
> > > +++ b/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml
> > > @@ -13,8 +13,7 @@ description:
> > >    This ADC forms part of an ST microelectronics STMPE multifunction device .
> > >    The ADC is shared with the STMPE touchscreen. As a result some ADC related
> > >    settings are specified in the parent node.
> > > -  The node name myst be stmpe_adc and should be a child node of the stmpe node
> > > -  to which it belongs.
> > > +  The node should be a child node of the stmpe node to which it belongs.
> > >  
> > >  properties:
> > >    compatible:  
> >   
>