linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] iio: accel: Add bma023 support to bma180
@ 2020-05-03 17:22 Jonathan Bakker
  2020-05-06 12:47 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Bakker @ 2020-05-03 17:22 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, robh+dt, linus.walleij, linux-iio,
	devicetree, linux-kernel, dmitry.torokhov, kstewart, gregkh,
	tglx, linux-input
  Cc: Jonathan Bakker

This patchset adds support for the bma023 three axis accelerometer
to the bma180 IIO driver.  The bma023 is found on several ~2010
phones, including the first-gen Galaxy S series.

The bma023 differs from later chips (bma180, bma25x) in that it
has no low power but still working mode and no temperature
channel.

The bma023 is already supported by a misc input driver (bma150), so
when both are enabled, the iio driver is preferred.  The bma150
is very similar to the bma023, but has a temperature channel.
Support for the bma150 is not added in this patchset.

While I was at it, I noticed that the dt binding doc was missing
the regulators, so I've added those in.

The patches have been tested on a GT-i9000.  The interrupt pin
is not connected on this board so the trigger was not tested.

Jonathan Bakker (5):
  iio: accel: bma180: Prepare for different reset values
  input: misc: bma150: Conditionally disable bma023 support
  dt-bindings: iio: accel: Add bma023 compatible to bma180
  dt-bindings: iio: accel: Add required regulators to bma180
  iio: accel: bma180: Add support for bma023

 .../devicetree/bindings/iio/accel/bma180.txt  |   5 +-
 drivers/iio/accel/Kconfig                     |   6 +-
 drivers/iio/accel/bma180.c                    | 131 +++++++++++++++++-
 drivers/input/misc/bma150.c                   |   3 +
 4 files changed, 135 insertions(+), 10 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/5] iio: accel: Add bma023 support to bma180
  2020-05-03 17:22 [PATCH 0/5] iio: accel: Add bma023 support to bma180 Jonathan Bakker
@ 2020-05-06 12:47 ` Linus Walleij
  2020-05-07  3:49   ` Jonathan Bakker
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2020-05-06 12:47 UTC (permalink / raw)
  To: Jonathan Bakker
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald, Rob Herring, linux-iio,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, Dmitry Torokhov, Kate Stewart, Greg KH,
	Thomas Gleixner, Linux Input

On Sun, May 3, 2020 at 7:22 PM Jonathan Bakker <xc-racer2@live.ca> wrote:

> This patchset adds support for the bma023 three axis accelerometer
> to the bma180 IIO driver.  The bma023 is found on several ~2010
> phones, including the first-gen Galaxy S series.
>
> The bma023 differs from later chips (bma180, bma25x) in that it
> has no low power but still working mode and no temperature
> channel.
>
> The bma023 is already supported by a misc input driver (bma150), so
> when both are enabled, the iio driver is preferred.  The bma150
> is very similar to the bma023, but has a temperature channel.
> Support for the bma150 is not added in this patchset.

I'd say, if it's not too much trouble please also patch in
support for BMA150 and SMB380 to the IIO driver so
we can delete this old Input driver, we have done this
before and thes "input drivers" are just causing headaches
and wasting time for the Input maintainer.

It can be in a separate patch set from this one if you
don't want to get stuck on this.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/5] iio: accel: Add bma023 support to bma180
  2020-05-06 12:47 ` Linus Walleij
@ 2020-05-07  3:49   ` Jonathan Bakker
  2020-05-08 12:47     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Bakker @ 2020-05-07  3:49 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald, Rob Herring, linux-iio,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, Dmitry Torokhov, Kate Stewart, Greg KH,
	Thomas Gleixner, Linux Input

Hi Linus,

On 2020-05-06 5:47 a.m., Linus Walleij wrote:
> On Sun, May 3, 2020 at 7:22 PM Jonathan Bakker <xc-racer2@live.ca> wrote:
> 
>> This patchset adds support for the bma023 three axis accelerometer
>> to the bma180 IIO driver.  The bma023 is found on several ~2010
>> phones, including the first-gen Galaxy S series.
>>
>> The bma023 differs from later chips (bma180, bma25x) in that it
>> has no low power but still working mode and no temperature
>> channel.
>>
>> The bma023 is already supported by a misc input driver (bma150), so
>> when both are enabled, the iio driver is preferred.  The bma150
>> is very similar to the bma023, but has a temperature channel.
>> Support for the bma150 is not added in this patchset.
> 
> I'd say, if it's not too much trouble please also patch in
> support for BMA150 and SMB380 to the IIO driver so
> we can delete this old Input driver, we have done this
> before and thes "input drivers" are just causing headaches
> and wasting time for the Input maintainer.
> 

Looking at the bma150, it looks the same.  The temperature is implemented
slightly differently than on the bma180+ (unsigned vs signed) but should
be quite easy to add.  I'll add a new patch for it in v2.

> It can be in a separate patch set from this one if you
> don't want to get stuck on this.
> 
> Yours,
> Linus Walleij
> 

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/5] iio: accel: Add bma023 support to bma180
  2020-05-07  3:49   ` Jonathan Bakker
@ 2020-05-08 12:47     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2020-05-08 12:47 UTC (permalink / raw)
  To: Jonathan Bakker
  Cc: Linus Walleij, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald, Rob Herring, linux-iio,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, Dmitry Torokhov, Kate Stewart, Greg KH,
	Thomas Gleixner, Linux Input

On Wed, 6 May 2020 20:49:17 -0700
Jonathan Bakker <xc-racer2@live.ca> wrote:

> Hi Linus,
> 
> On 2020-05-06 5:47 a.m., Linus Walleij wrote:
> > On Sun, May 3, 2020 at 7:22 PM Jonathan Bakker <xc-racer2@live.ca> wrote:
> >   
> >> This patchset adds support for the bma023 three axis accelerometer
> >> to the bma180 IIO driver.  The bma023 is found on several ~2010
> >> phones, including the first-gen Galaxy S series.
> >>
> >> The bma023 differs from later chips (bma180, bma25x) in that it
> >> has no low power but still working mode and no temperature
> >> channel.
> >>
> >> The bma023 is already supported by a misc input driver (bma150), so
> >> when both are enabled, the iio driver is preferred.  The bma150
> >> is very similar to the bma023, but has a temperature channel.
> >> Support for the bma150 is not added in this patchset.  
> > 
> > I'd say, if it's not too much trouble please also patch in
> > support for BMA150 and SMB380 to the IIO driver so
> > we can delete this old Input driver, we have done this
> > before and thes "input drivers" are just causing headaches
> > and wasting time for the Input maintainer.
> >   
> 
> Looking at the bma150, it looks the same.  The temperature is implemented
> slightly differently than on the bma180+ (unsigned vs signed) but should
> be quite easy to add.  I'll add a new patch for it in v2.

Great.  Series looks fine to me as well, so should be fine to apply v2.
(subject to Dmitry Ack).

Jonathan

> 
> > It can be in a separate patch set from this one if you
> > don't want to get stuck on this.
> > 
> > Yours,
> > Linus Walleij
> >   
> 
> Thanks,
> Jonathan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-08 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 17:22 [PATCH 0/5] iio: accel: Add bma023 support to bma180 Jonathan Bakker
2020-05-06 12:47 ` Linus Walleij
2020-05-07  3:49   ` Jonathan Bakker
2020-05-08 12:47     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).