public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Svyatoslav Ryhel" <clamor95@gmail.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Samu Onkalo" <samu.p.onkalo@nokia.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] misc: adps990x: convert to OF
Date: Tue, 1 Aug 2023 19:10:26 +0100	[thread overview]
Message-ID: <20230801191026.02512438@jic23-huawei> (raw)
In-Reply-To: <c7526061-2f4e-4843-825c-98d9494af625@app.fastmail.com>

On Mon, 31 Jul 2023 17:38:59 +0200
"Arnd Bergmann" <arnd@arndb.de> wrote:

> On Mon, Jul 31, 2023, at 16:58, Svyatoslav Ryhel wrote:
> > 31 липня 2023 р. 16:18:16 GMT+03:00, Arnd Bergmann <arnd@arndb.de> написав(-ла):  
> >>On Mon, Jul 31, 2023, at 13:02, Svyatoslav Ryhel wrote:  
> >>> Add ability to use device tree bindings keeping existing setup.  
> >>
> >>I see that there are no more in-tree users of the old
> >>apds990x_platform_data, so I think it would be best to completely
> >>remove that codepath and merge that structure into struct
> >>apds990x_chip, to simplify the probing and avoid the extra
> >>allocation.  
> >
> > Thank you very much for your review, but is it mandatory to drop pdata 
> > in this particular patch set? To be honest this driver needs serious 
> > upgrades and refactoring, and I have no dedication to invest my time 
> > into refactoring it, moreover, I am not a maintainer of this driver, 
> > nor a full time kernel maintainer of any kind. I am doing what I am 
> > doing only because one of my devices uses this als but it is not 
> > something crucial.  
> 
> We have a lot of drivers that are lacking the cleanup I'm asking
> for, so I don't think I'd mandate it at this point, but I don't
> actually expect the patch to be any more complicated in the end,
> so just try it out.
> 
> I think at the minimum, please remove the include/platform_data
> header and move the contents into the driver itself, I'd be fine
> with that. If you can easily do further cleanup by dropping
> the separate allocation and folding the apds990x_fw_probe()
> function back into apds990x_probe(), please do that, just stop
> at the point where you feel it gets too complicated.
> 

It's a long shot, but this looks pretty close in register map to
the apds9960 in IIO.

Maybe try adding the ID to that driver and cross your fingers?

There is some stuff going on around the register address / commands
that I haven't figured out but it looks similar for the byte access
path and that may be all the IIO driver is using.

If you are fine testing, it's possible someone else might do the
leg work (if me I'll emulate just enough to convince myself I didn't
break it too badly). Won't be high on my list, but maybe I'll get
a boring wet weekend sometime...

Jonathan

>     Arnd


  reply	other threads:[~2023-08-01 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 11:02 [PATCH v1 0/2] Update APDS990x ALS to support device trees Svyatoslav Ryhel
2023-07-31 11:02 ` [PATCH v1 1/2] dt-bindings: iio: light: add apds990x binding Svyatoslav Ryhel
2023-07-31 13:23   ` Arnd Bergmann
2023-07-31 11:02 ` [PATCH v1 2/2] misc: adps990x: convert to OF Svyatoslav Ryhel
2023-07-31 13:18   ` Arnd Bergmann
2023-07-31 14:58     ` Svyatoslav Ryhel
2023-07-31 15:38       ` Arnd Bergmann
2023-08-01 18:10         ` Jonathan Cameron [this message]
2023-08-01 18:13           ` Svyatoslav Ryhel

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=20230801191026.02512438@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=arnd@arndb.de \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=samu.p.onkalo@nokia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox