Re: [PATCH 3/6] iio: accel: kxcjk1013: rename registers for KXTF9 compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 20, 2017 at 10:52:22AM +0100, Jonathan Cameron wrote:
> On Thu, 17 Aug 2017 16:21:36 +0200
> Michał Mirosław <mirq-linux@xxxxxxxxxxxx> wrote:
> > Rename some registers that are shared between KXTF9 and KXCJK.
> > Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
> 
> Hi Michał,
> 
> I'm not keen on this change.   Going for generic names is always
> fragile as all it takes is another part coming along which is almost
> but not quite the same as you shared register set and we end up with
> a mess.
> 
> General convention for both register values and driver naming is they
> should be named after one supported part rather than trying to find
> a generic name that covers all supported parts.
> 
> So please revert this change and resend the series.
> 
> Sorry to be a pain, but this has gone wrong quite a lot of times in
> the past!

I removed the renaming, but left KXTF9-specific registers with KXTF9_
prefix. This is hard to avoid as some registers are named differently
in KXTF9 and KXCJK datasheets, but are otherwise compatible. There is
also a register that is the same but has different address.

I'll send v2 shortly.

BTW, I browsed through "sell sheets" of Kionix's accelerometers, and
I would guess that for eg. KXCJK-1013, "KXCJK" is a model, and "1013"
is variation. KXTF9 has two such variations differing only in supply
voltages it is calibrated to run with. Based on that I would rename
the driver to "kxcjk" to save on typing if there are more similar
parts to add later. There is KXSD9 driver (different register set), so
this would match clearly.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux