<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/input/misc/bma150.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-05-13T22:43:19+00:00</updated>
<entry>
<title>Input: drop explicit initialization of struct i2c_device_id::driver_data to 0</title>
<updated>2024-05-13T22:43:19+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-05-09T17:41:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5852f2afcdd9b7c9dedec4fdf14b8b079349828f'/>
<id>urn:sha1:5852f2afcdd9b7c9dedec4fdf14b8b079349828f</id>
<content type='text'>
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20240509174158.2211071-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: Switch i2c drivers back to use .probe()</title>
<updated>2023-05-17T16:59:11+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-17T16:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d8bde56dfd86a0bba9206de8574e58c8aaac4f0f'/>
<id>urn:sha1:d8bde56dfd86a0bba9206de8574e58c8aaac4f0f</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: bma150 - Convert to i2c's .probe_new()</title>
<updated>2022-12-02T22:53:42+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-11-18T22:39:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8140acff121736e4e673c5c7533bf6dd5ffbd946'/>
<id>urn:sha1:8140acff121736e4e673c5c7533bf6dd5ffbd946</id>
<content type='text'>
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20221118224540.619276-211-uwe@kleine-koenig.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>i2c: Make remove callback return void</title>
<updated>2022-08-16T10:46:26+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-08-15T08:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed5c2f5fd10dda07263f79f338a512c0f49f76f5'/>
<id>urn:sha1:ed5c2f5fd10dda07263f79f338a512c0f49f76f5</id>
<content type='text'>
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Reviewed-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Reviewed-by: Benjamin Mugnier &lt;benjamin.mugnier@foss.st.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Crt Mori &lt;cmo@melexis.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Marek Behún &lt;kabel@kernel.org&gt; # for leds-turris-omnia
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt; # for mlxsw
Reviewed-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt; # for surface3_power
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt; # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt; # for media/* + staging/media/*
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt; # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt; # for versaclock5
Reviewed-by: Ajay Gupta &lt;ajayg@nvidia.com&gt; # for ucsi_ccg
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt; # for iio
Acked-by: Peter Rosin &lt;peda@axentia.se&gt; # for i2c-mux-*, max9860
Acked-by: Adrien Grassein &lt;adrien.grassein@gmail.com&gt; # for lontium-lt8912b
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt; # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt; # for IPMI
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt; # for drivers/power
Acked-by: Krzysztof Hałasa &lt;khalasa@piap.pl&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>Input: bma150 - switch to using polled mode of input devices</title>
<updated>2019-10-30T00:15:50+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-10-30T00:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b873f73cf66ffd19c6eba47ade6844ac01e9ccb0'/>
<id>urn:sha1:b873f73cf66ffd19c6eba47ade6844ac01e9ccb0</id>
<content type='text'>
We have added polled mode to the normal input devices with the intent of
retiring input_polled_dev. This converts bma150 driver to use the polling
mode of standard input devices and removes dependency on INPUT_POLLDEV.

Link: https://lore.kernel.org/r/20191017204217.106453-21-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: bma150 - use managed resources helpers</title>
<updated>2019-10-30T00:15:49+00:00</updated>
<author>
<name>Jonathan Bakker</name>
<email>xc-racer2@live.ca</email>
</author>
<published>2019-10-30T00:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=493a6ebd59dcecb09d8e97293e1b254ad0003a7b'/>
<id>urn:sha1:493a6ebd59dcecb09d8e97293e1b254ad0003a7b</id>
<content type='text'>
The driver can be cleaned up by using managed resource helpers.

Signed-off-by: Jonathan Bakker &lt;xc-racer2@live.ca&gt;
Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
[dtor: do not explicitly set parent of input device since we are using devm]
Link: https://lore.kernel.org/r/20191017204217.106453-20-dmitry.torokhov@gmail.com

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61</title>
<updated>2019-05-24T15:36:45+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-20T07:19:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74ba9207e1adf1966c57450340534ae9742d00af'/>
<id>urn:sha1:74ba9207e1adf1966c57450340534ae9742d00af</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  675 mass ave cambridge ma 02139 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 441 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt; (powerpc)
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Input: bma150 - register input device after setting private data</title>
<updated>2019-02-06T19:26:40+00:00</updated>
<author>
<name>Jonathan Bakker</name>
<email>xc-racer2@live.ca</email>
</author>
<published>2019-02-06T18:45:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90cc55f067f6ca0e64e5e52883ece47d8af7b67b'/>
<id>urn:sha1:90cc55f067f6ca0e64e5e52883ece47d8af7b67b</id>
<content type='text'>
Otherwise we introduce a race condition where userspace can request input
before we're ready leading to null pointer dereference such as

input: bma150 as /devices/platform/i2c-gpio-2/i2c-5/5-0038/input/input3
Unable to handle kernel NULL pointer dereference at virtual address 00000018
pgd = (ptrval)
[00000018] *pgd=55dac831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT ARM
Modules linked in: bma150 input_polldev [last unloaded: bma150]
CPU: 0 PID: 2870 Comm: accelerometer Not tainted 5.0.0-rc3-dirty #46
Hardware name: Samsung S5PC110/S5PV210-based board
PC is at input_event+0x8/0x60
LR is at bma150_report_xyz+0x9c/0xe0 [bma150]
pc : [&lt;80450f70&gt;]    lr : [&lt;7f0a614c&gt;]    psr: 800d0013
sp : a4c1fd78  ip : 00000081  fp : 00020000
r10: 00000000  r9 : a5e2944c  r8 : a7455000
r7 : 00000016  r6 : 00000101  r5 : a7617940  r4 : 80909048
r3 : fffffff2  r2 : 00000000  r1 : 00000003  r0 : 00000000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 54e34019  DAC: 00000051
Process accelerometer (pid: 2870, stack limit = 0x(ptrval))
Stackck: (0xa4c1fd78 to 0xa4c20000)
fd60:                                                       fffffff3 fc813f6c
fd80: 40410581 d7530ce3 a5e2817c a7617f00 a5e29404 a5e2817c 00000000 7f008324
fda0: a5e28000 8044f59c a5fdd9d0 a5e2945c a46a4a00 a5e29668 a7455000 80454f10
fdc0: 80909048 a5e29668 a5fdd9d0 a46a4a00 806316d0 00000000 a46a4a00 801df5f0
fde0: 00000000 d7530ce3 a4c1fec0 a46a4a00 00000000 a5fdd9d0 a46a4a08 801df53c
fe00: 00000000 801d74bc a4c1fec0 00000000 a4c1ff70 00000000 a7038da8 00000000
fe20: a46a4a00 801e91fc a411bbe0 801f2e88 00000004 00000000 80909048 00000041
fe40: 00000000 00020000 00000000 dead4ead a6a88da0 00000000 ffffe000 806fcae8
fe60: a4c1fec8 00000000 80909048 00000002 a5fdd9d0 a7660110 a411bab0 00000001
fe80: dead4ead ffffffff ffffffff a4c1fe8c a4c1fe8c d7530ce3 20000013 80909048
fea0: 80909048 a4c1ff70 00000001 fffff000 a4c1e000 00000005 00026038 801eabd8
fec0: a7660110 a411bab0 b9394901 00000006 a696201b 76fb3000 00000000 a7039720
fee0: a5fdd9d0 00000101 00000002 00000096 00000000 00000000 00000000 a4c1ff00
ff00: a6b310f4 805cb174 a6b310f4 00000010 00000fe0 00000010 a4c1e000 d7530ce3
ff20: 00000003 a5f41400 a5f41424 00000000 a6962000 00000000 00000003 00000002
ff40: ffffff9c 000a0000 80909048 d7530ce3 a6962000 00000003 80909048 ffffff9c
ff60: a6962000 801d890c 00000000 00000000 00020000 a7590000 00000004 00000100
ff80: 00000001 d7530ce3 000288b8 00026320 000288b8 00000005 80101204 a4c1e000
ffa0: 00000005 80101000 000288b8 00026320 000288b8 000a0000 00000000 00000000
ffc0: 000288b8 00026320 000288b8 00000005 7eef3bac 000264e8 00028ad8 00026038
ffe0: 00000005 7eef3300 76f76e91 76f78546 800d0030 000288b8 00000000 00000000
[&lt;80450f70&gt;] (input_event) from [&lt;a5e2817c&gt;] (0xa5e2817c)
Code: e1a08148 eaffffa8 e351001f 812fff1e (e590c018)
---[ end trace 1c691ee85f2ff243 ]---

Signed-off-by: Jonathan Bakker &lt;xc-racer2@live.ca&gt;
Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: bma150 - remove support for bma150</title>
<updated>2017-04-01T18:44:53+00:00</updated>
<author>
<name>H. Nikolaus Schaller</name>
<email>hns@goldelico.com</email>
</author>
<published>2017-04-01T16:43:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f069b5a0b27ad4a87e9351e54fbcab3d3f8a9fd5'/>
<id>urn:sha1:f069b5a0b27ad4a87e9351e54fbcab3d3f8a9fd5</id>
<content type='text'>
This essentially reverts commit baf28d91e7b1 ("Input: bma150 - avoid
binding to bma180 if IIO bma180 driver present") and commit ef3714fdbc8d
("Input: bma150 - extend chip detection for bma180")

Rationale: initially (2012) the GTA04 device using a bma180 chip simply
referenced the bma150 platform driver in its board file [1] which happened
to work in all scenarios that were tested.

When conversion to DT started (2014), we needed to make the driver be still
recognised. Hence we introduced the compatibility to the bma180 chip in
Linux 3.15-rc5 [2] without further checks if it is really 100% compatible.
This worked flawlessly for years with the GTA04 device.

Recently (2016), Hans de Goede pointed out that the chips are not as
similar as they appeared and the driver works with the bma180 for the GTA04
only by good luck. He proposed to remove the bma180 support completely [3],
but we still did need it until we have a replacement. Thus, a conditional
compile was added.

We have now developed a generic iio-input-bridge which works with any 2 or
3 axis iio based accelerometer. It has been tested on GTA04 and Pyra and
works as expected. Therefore we can remove the bma180 support from this
driver completely. User-space API compatibility can be restored by using
the iio-input-bridge.

Maybe it is time to convert the bma150 driver to iio as well and retire the
accelerometer input drivers completely but this is a different story and
task.

[1]: https://github.com/neilbrown/linux/blob/gta04/3.2.y/arch/arm/mach-omap2/board-omap3gta04.c#L976
[2]: https://patchwork.kernel.org/patch/3961171/
[3]: https://patchwork.kernel.org/patch/9325481/

Signed-off-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: bma150 - switch to using usleep_range instead of msleep</title>
<updated>2016-12-27T21:36:50+00:00</updated>
<author>
<name>Aniroop Mathur</name>
<email>a.mathur@samsung.com</email>
</author>
<published>2016-12-27T21:22:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f63bb4f442d6c7929e58d671d1f46e122c441884'/>
<id>urn:sha1:f63bb4f442d6c7929e58d671d1f46e122c441884</id>
<content type='text'>
msleep (1~20) may not do what the caller intends, and will often sleep
longer.  (~20 ms actual sleep for any value given in the 1~20ms range) This
is not the desired behaviour for many cases like device resume time, device
suspend time, device enable time, etc.  Thus, change msleep to usleep_range
for precise wakeups.

Signed-off-by: Aniroop Mathur &lt;a.mathur@samsung.com&gt;
Acked by: Albert Zhang &lt;xu.zhang@bosch-sensortec.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
