From: Jonathan Cameron <jic23@kernel.org>
To: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Philipp Jungkamp <p.jungkamp@gmx.net>,
Jiri Kosina <jikos@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] IIO: hid-sensor-prox: add missing scale attribute
Date: Mon, 16 Oct 2023 08:44:00 +0100 [thread overview]
Message-ID: <20231016084400.79932e58@jic23-huawei> (raw)
In-Reply-To: <20231015120448.6279430d@jic23-huawei>
On Sun, 15 Oct 2023 12:04:48 +0100
Jonathan Cameron <jic23@kernel.org> wrote:
> On Sat, 14 Oct 2023 19:56:26 -0700
> srinivas pandruvada <srinivas.pandruvada@linux.intel.com> wrote:
>
> > On Sat, 2023-10-14 at 17:52 +0100, Jonathan Cameron wrote:
> > > On Tue, 8 Aug 2023 14:22:10 +0200
> > > Philipp Jungkamp <p.jungkamp@gmx.net> wrote:
> > >
> > > > > > The hid-sensor-prox returned an empty string on sysfs
> > > > > > in_proximity_scale
> > > > > > read. This is due to the the driver's scale never being
> > > > > > initialized.
> > > > >
> > > > > What is scale value reporting here? Is it 1.
> > > > >
> > > > > Thanks,
> > > > > Srinivas
> > > >
> > > > Calling `read` on the sysfs file `in_proximity_scale` returns 0,
> > > > thus an empty string.
> > > > Adding the hid_format_scale call makes that a '1.000000'.
> > > >
> > > > Regards,
> > > > Philipp
> > >
> > > Srinivas - I was kind of waiting for a reply to say if you are happy
> > > with the explanation.
> > > All good?
> > All good.
> >
> > Acked-by: Srinivas Pandruvada<srinivas.pandruvada@linux.intel.com>
> >
> Given we are late in the cycle and my next fixes pull will probably end up
> going in during the merge window anyway, I've applied this to the togreg
> branch of iio.git (so the slow path).
>
> Phillipp, if a backport makes sense you can request that after this
> goes upstream.
Whilst typing up a pull request I saw this again and thought a bit more on it.
This fix is probably wrong approach. Proximity sensors are often scale free
because they depend on reflectance off something or a capacitance changing etc
so we don't know the scaling. So the right response then is not to return a scale
value of 1.0 but to not provide the attribute at all. Is that something that
could be easily done here?
For now I'm dropping the patch. Sorry I wasn't paying enough attention to notice
this was a proximity sensor.
Jonathan
>
> Thanks,
>
> Jonathan
>
> > >
> > > Phillipp - this sounds like a fix to me. Fixes tag?
> > >
> > > Thanks,
> > >
> > > Jonathan
> >
>
next prev parent reply other threads:[~2023-10-16 7:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-06 12:59 [PATCH] IIO: hid-sensor-prox: add missing scale attribute Philipp Jungkamp
2023-08-07 23:02 ` srinivas pandruvada
2023-08-08 12:22 ` Aw: " Philipp Jungkamp
2023-10-14 16:52 ` Jonathan Cameron
2023-10-15 2:56 ` srinivas pandruvada
2023-10-15 11:04 ` Jonathan Cameron
2023-10-16 7:44 ` Jonathan Cameron [this message]
2023-10-16 14:28 ` srinivas pandruvada
2023-10-17 19:11 ` Jonathan Cameron
2023-10-18 1:56 ` srinivas pandruvada
2023-10-28 16:30 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2022-12-22 12:07 Philipp Jungkamp
2022-12-23 14:07 ` Jonathan Cameron
2023-01-02 16:43 ` srinivas pandruvada
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=20231016084400.79932e58@jic23-huawei \
--to=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=p.jungkamp@gmx.net \
--cc=srinivas.pandruvada@linux.intel.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