- 15 11月, 2022 1 次提交
-
-
由 Angel Iglesias 提交于
Introduces new helper function to aid in .probe_new() refactors. In order to use existing i2c_get_device_id() on the probe callback, the device match table needs to be accessible in that function, which would require bigger refactors in some drivers using the deprecated .probe callback. This issue was discussed in more detail in the IIO mailing list. Link: https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/Suggested-by: NNuno Sá <noname.nuno@gmail.com> Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Suggested-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 16 8月, 2022 1 次提交
-
-
由 Uwe Kleine-König 提交于
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: NPeter Senna Tschudin <peter.senna@gmail.com> Reviewed-by: NJeremy Kerr <jk@codeconstruct.com.au> Reviewed-by: NBenjamin Mugnier <benjamin.mugnier@foss.st.com> Reviewed-by: NJavier Martinez Canillas <javierm@redhat.com> Reviewed-by: NCrt Mori <cmo@melexis.com> Reviewed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013 Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/* Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5 Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860 Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI Reviewed-by: NVladimir Oltean <olteanv@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power Acked-by: NKrzysztof Hałasa <khalasa@piap.pl> Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 27 7月, 2022 1 次提交
-
-
由 Wolfram Sang 提交于
It was stated how the error codes should be. It was not stated what the regular case should return. Add this. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 20 3月, 2022 1 次提交
-
-
由 Jae Hyun Yoo 提交于
I2C slave events tracepoints can be enabled by: echo 1 > /sys/kernel/tracing/events/i2c_slave/enable and logs in /sys/kernel/tracing/trace will look like: ... i2c_slave: i2c-0 a=010 ret=0 WR_REQ [] ... i2c_slave: i2c-0 a=010 ret=0 WR_RCV [02] ... i2c_slave: i2c-0 a=010 ret=0 WR_RCV [0c] ... i2c_slave: i2c-0 a=010 ret=0 STOP [] ... i2c_slave: i2c-0 a=010 ret=0 RD_REQ [04] ... i2c_slave: i2c-0 a=010 ret=0 RD_PRO [b4] ... i2c_slave: i2c-0 a=010 ret=0 STOP [] formatted as: i2c-<adapter_nr> a=<addr> ret=<ret> <- callback return value <event> [<data>] trace printings can be selected by adding a filter like: echo adapter_nr==1 >/sys/kernel/tracing/events/i2c_slave/filter Signed-off-by: NJae Hyun Yoo <quic_jaehyoo@quicinc.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 13 12月, 2021 1 次提交
-
-
由 Hans de Goede 提交于
Change i2c_acpi_new_device() into i2c_acpi_new_device_by_fwnode() and add a static inline wrapper providing the old i2c_acpi_new_device() behavior. This is necessary because in some cases we may only have access to the fwnode / acpi_device and not to the matching physical-node struct device *. Suggested-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NWolfram Sang <wsa@kernel.org> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20211203102857.44539-4-hdegoede@redhat.com
-
- 15 11月, 2021 2 次提交
-
-
由 Jakub Kicinski 提交于
This reverts commit 71812af7, reversing changes made to cc0be1ad. Wolfram Sang says: Please revert. Besides the driver in net, it modifies the I2C core code. This has not been acked by the I2C maintainer (in this case me). So, please don't pull this in via the net tree. The question raised here (extending SMBus calls to 255 byte) is complicated because we need ABI backwards compatibility. Link: https://lore.kernel.org/all/YZJ9H4eM%2FM7OXVN0@shikoro/Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Matt Johnston 提交于
SMBus 3.0 increased the maximum block transfer size from 32 bytes to 255 bytes. We increase the size of struct i2c_smbus_data's block[] member. i2c_smbus_xfer() and i2c_smbus_xfer_emulated() now support 255 byte block operations, other block functions remain limited to 32 bytes for compatibility with existing callers. We allow adapters to indicate support for the larger size with I2C_FUNC_SMBUS_V3_BLOCK. Most emulated drivers should be able to use 255 byte blocks by replacing I2C_SMBUS_BLOCK_MAX with I2C_SMBUS_V3_BLOCK_MAX though some will have hardware limitations that need testing. Signed-off-by: NMatt Johnston <matt@codeconstruct.com.au> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 11月, 2021 1 次提交
-
-
由 Sakari Ailus 提交于
Enable drivers to tell ACPI that there's no need to power on a device for probe. Drivers should still perform this by themselves if there's a need to. In some cases powering on the device during probe is undesirable, and this change enables a driver to choose what fits best for it. Add a field called "flags" into struct i2c_driver for driver flags, and a flag I2C_DRV_ACPI_WAIVE_D0_PROBE to tell a driver supports probe in ACPI D states other than 0. Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: NTomasz Figa <tfiga@chromium.org> Acked-by: NWolfram Sang <wsa@kernel.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 12 8月, 2021 1 次提交
-
-
由 Hans de Goede 提交于
We have 3 files now which have the need to count the number of I2cSerialBus resources in an ACPI-device's resource-list. Currently all implement their own helper function for this, add a generic helper function to replace the 3 implementations. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210803160044.158802-2-hdegoede@redhat.comAcked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NWolfram Sang <wsa@kernel.org>
-
- 25 6月, 2021 1 次提交
-
-
由 Quan Nguyen 提交于
Expose the PEC calculation i2c_smbus_pec() for generic use. Signed-off-by: NQuan Nguyen <quan@os.amperecomputing.com> Acked-by: NMatt Johnston <matt@codeconstruct.com.au> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 07 6月, 2021 1 次提交
-
-
由 Jonathan Cameron 提交于
If I2C is not compiled, there is no way we should see a call to i2c_verify_client() on a device that is an i2c client. As such, provide a stub to return NULL to resolve an associated build failure. The build is failing with this link error ld: fxls8962af-core.o: in function `fxls8962af_fifo_transfer': fxls8962af-core.c: undefined reference to `i2c_verify_client' Reported-by: NTom Rix <trix@redhat.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Fixes: af959b7b ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") Reviewed-by: NSean Nyekjaer <sean@geanix.com> Acked-by: NWolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20210603165835.3594557-1-jic23@kernel.org
-
- 29 5月, 2021 1 次提交
-
-
由 Bibby Hsieh 提交于
Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We can control bulk regulator if it is provided in i2c adapter device. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 11 4月, 2021 4 次提交
-
-
由 Dmitry Torokhov 提交于
More and more drivers rely on devres to manage their resources, however if bus' probe() and release() methods are not trivial and control some of resources as well (for example enable or disable clocks, or attach device to a power domain), we need to make sure that driver-allocated resources are released immediately after driver's remove() method returns, and not postponed until driver core gets around to releasing resources. To fix that we open a new devres group before calling driver's probe() and explicitly release it when we return from driver's remove(). Tested-by: NJeff LaBundy <jeff@labundy.com> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Yicong Yang 提交于
Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Tested-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NYicong Yang <yangyicong@hisilicon.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Yicong Yang 提交于
Some I2C controller drivers will only unregister the I2C adapter in their .remove() callback, which can be done by simply using a managed variant to add the I2C adapter. So add the managed functions for adding the I2C adapter. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NYicong Yang <yangyicong@hisilicon.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Heikki Krogerus 提交于
From now on only accepting complete software nodes. Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 09 4月, 2021 1 次提交
-
-
由 Heikki Krogerus 提交于
This makes it possible for the drivers to assign complete software fwnodes to the devices instead of only the device properties in those nodes. Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 06 4月, 2021 1 次提交
-
-
由 Bence Csókás 提交于
This quirk signifies that the adapter cannot do a repeated START, it always issues a STOP condition after transfers. Suggested-by: NWolfram Sang <wsa@kernel.org> Signed-off-by: NBence Csókás <bence98@sch.bme.hu> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 21 9月, 2020 1 次提交
-
-
由 Tian Tao 提交于
Switch to using the new API kobj_to_dev(). Signed-off-by: NTian Tao <tiantao6@hisilicon.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 05 8月, 2020 1 次提交
-
-
由 Codrin Ciubotariu 提交于
Multiple I2C bus drivers use similar bindings to obtain information needed for I2C recovery. For example, for platforms using device-tree, the properties look something like this: &i2c { ... pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c_default>; pinctrl-1 = <&pinctrl_i2c_gpio>; sda-gpios = <&pio 0 GPIO_ACTIVE_HIGH>; scl-gpios = <&pio 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ... } For this reason, we can add this common initialization in the core. This way, other I2C bus drivers will be able to support GPIO recovery just by providing a pointer to platform's pinctrl and calling i2c_recover_bus() when SDA is stuck low. Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com> [wsa: inverted one logic for better readability, minor update to kdoc] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 28 7月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
All i2c_new_device-alike functions return ERR_PTR these days, but this fallback function was missed. Fixes: 2dea645f ("i2c: acpi: Return error pointers from i2c_acpi_new_device()") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> [wsa: changed from 'ENOSYS' to 'ENODEV'] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 25 7月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
This manually reverts commit d1d84bb9. The only user has gone two years ago with commit 589edb56 ("ACPI / scan: Create platform device for INT33FE ACPI nodes") and no new user has showed up. Remove and hope we will never need it again. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 22 7月, 2020 1 次提交
-
-
由 Randy Dunlap 提交于
Drop the doubled word "be" in a comment. Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 19 6月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
All in-tree users have been converted to the new i2c_new_client_device function, so remove this deprecated one. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 29 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
i2c_client pointers are usually named 'client'. Use it here to get rid of the ambiguity of 'dev->dev'. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 22 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
This reverts commit 6fe12cdb. Testing in linux-next showed it needs some more time. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 20 5月, 2020 1 次提交
-
-
由 Bibby Hsieh 提交于
Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We get and enable bulk regulator in i2c adapter device. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: NTomasz Figa <tfiga@chromium.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 05 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
The old email is still active, but for easier handling, I am going to use my kernel.org address from now on. Also, add a mailmap for the now defunct Pengutronix address. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 15 4月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
All in-tree users have been converted to the new i2c_new_scanned_device function, so remove this deprecated one. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 25 3月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
There are few maximum bus frequencies being used in the I²C core code. Provide generic definitions for bus frequencies and use them in the core. The drivers may use predefined constants where it is appropriate. Some of them are already using these under slightly different names. We will convert them later to use newly introduced defines. Note, the name of modes are chosen to follow well established naming scheme [1]. These definitions will also help to avoid typos in the numbers that may lead to subtle errors. [1]: https://en.wikipedia.org/wiki/I%C2%B2C#Differences_between_modesAcked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 23 3月, 2020 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
Don't let non-letters inside a literal block without escaping it, as the toolchain would mis-interpret it: ./include/linux/i2c.h:518: WARNING: Inline strong start-string without end-string. Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 12月, 2019 1 次提交
-
-
由 Luca Ceresoli 提交于
According to coding-style.rst, extern should not be specified for exported functions. Signed-off-by: NLuca Ceresoli <luca@lucaceresoli.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 11 12月, 2019 3 次提交
-
-
由 Wolfram Sang 提交于
As a preparation for an API conversion, factor out something frequently used in the media subsystem. As an improvement, it bails out on both, NULL and ERRPTR to handle the old and new API. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Randy Dunlap 提交于
Fix kernel-doc warning in <linux/i2c.h>. ../include/linux/i2c.h:337: warning: Function parameter or member 'init_irq' not described in 'i2c_client' Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
All in-kernel users have been converted to {devm_}i2c_new_dummy_device(). Remove the old API. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 29 11月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
In the general move to have i2c_new_*_device functions which return ERR_PTR instead of NULL, this patch converts i2c_new_probed_device(). There are only few users, so this patch converts the I2C core and all users in one go. The function gets renamed to i2c_new_scanned_device() so out-of-tree users will get a build failure to understand they need to adapt their error checking code. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NMax Staudt <max@enpas.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 16 11月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
There are no in-tree users of these helpers anymore, and there shouldn't. Most use cases went away once the driver model started to refcount for us. There have been users like the media subsystem, but they all switched to better refcounting methods meanwhile. Media did this in 2008. Last user (IPMI) left 2018. Remove this cruft. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NJean Delvare <jdelvare@suse.de> Tested-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
-
- 25 10月, 2019 1 次提交
-
-
由 Eugen Hristev 提交于
i2c-digital-filter-width-ns: This optional timing property specifies the width of the spikes on the i2c lines (in ns) that can be filtered out by built-in digital filters which are embedded in some i2c controllers. i2c-analog-filter-cutoff-frequency: This optional timing property specifies the cutoff frequency of a low-pass analog filter built-in i2c controllers. This low pass filter is used to filter out high frequency noise on the i2c lines. Specified in Hz. Include these properties in the timings structure and read them as integers. Signed-off-by: NEugen Hristev <eugen.hristev@microchip.com> Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 8月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
In the general move to have i2c_new_*_device functions which return ERR_PTR instead of NULL, this patch converts i2c_new_secondary_device(). There are only few users, so this patch converts the I2C core and all users in one go. The function gets renamed to i2c_new_ancillary_device() so out-of-tree users will get a build failure to understand they need to adapt their error checking code. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> # adv748x Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # adv7511 + adv7604 Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # adv7604 Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 01 8月, 2019 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
Convert each file at I2C subsystem, renaming them to .rst and adding to the driver-api book. Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NJonathan Corbet <corbet@lwn.net>
-