- 17 1月, 2023 1 次提交
-
-
由 Russell King (Oracle) 提交于
Add fwnode APIs for finding and getting I2C adapters, which will be used by the SFP code. These are passed the fwnode corresponding to the adapter, and return the I2C adapter. It is the responsibility of the caller to find the appropriate fwnode. We keep the DT and ACPI interfaces, but where appropriate, recode them to use the fwnode interfaces internally. Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 05 12月, 2022 1 次提交
-
-
由 Stephen Kitt 提交于
All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This is part of an ongoing transition to single-argument i2c probe functions. Old-style probe functions involve a call to i2c_match_id: in drivers/i2c/i2c-core-base.c, /* * When there are no more users of probe(), * rename probe_new to probe. */ if (driver->probe_new) status = driver->probe_new(client); else if (driver->probe) status = driver->probe(client, i2c_match_id(driver->id_table, client)); else status = -EINVAL; Drivers which don't need the second parameter can be declared using probe_new instead, avoiding the call to i2c_match_id. Drivers which do can still be converted to probe_new-style, calling i2c_match_id themselves (as is done currently for of_match_id). This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: NStephen Kitt <steve@sk2.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 15 11月, 2022 2 次提交
-
-
由 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>
-
由 Ricardo Ribalda 提交于
A driver that supports I2C_DRV_ACPI_WAIVE_D0_PROBE is not expected to power off a device that it has not powered on previously. For devices operating in "full_power" mode, the first call to `i2c_acpi_waive_d0_probe` will return 0, which means that the device will be turned on with `dev_pm_domain_attach`. If probe fails the second call to `i2c_acpi_waive_d0_probe` will return 1, which means that the device will not be turned off. This is, it will be left in a different power state. Lets fix it. Reviewed-by: NHidenori Kobayashi <hidenorik@chromium.org> Reviewed-by: NSergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: NSakari Ailus <sakari.ailus@linux.intel.com> Cc: stable@vger.kernel.org Fixes: b18c1ad6 ("i2c: Allow an ACPI driver to manage the device's power state during probe") Signed-off-by: NRicardo Ribalda <ribalda@chromium.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 04 10月, 2022 1 次提交
-
-
由 Raul E Rangel 提交于
Device tree already has a mechanism to pass the wake_irq. It does this by looking for the wakeup-source property and setting the I2C_CLIENT_WAKE flag. This CL adds the ACPI equivalent. It uses the ACPI interrupt wake flag to determine if the interrupt can be used to wake the system. Previously the i2c drivers had to make assumptions and blindly enable the wake IRQ. This can cause spurious wake events. e.g., If there is a device with an Active Low interrupt and the device gets powered off while suspending, the interrupt line will go low since it's no longer powered and wakes the system. For this reason we should respect the board designers wishes and honor the wake bit defined on the interrupt. Signed-off-by: NRaul E Rangel <rrangel@chromium.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NWolfram Sang <wsa@kernel.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 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>
-
- 12 8月, 2022 1 次提交
-
-
由 Wolfram Sang 提交于
Follow the advice of the below link and prefer 'strscpy'. Conversion is easy because no code used the return value. It has been done with a simple sed invocation. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 17 6月, 2022 1 次提交
-
-
由 Xu Wang 提交于
Free the adap structure only after we are done using it. This patch just moves the put_device() down a bit to avoid the use after free. Fixes: 611e12ea ("i2c: core: manage i2c bus device refcount in i2c_[get|put]_adapter") Signed-off-by: NXu Wang <vulab@iscas.ac.cn> [wsa: added comment to the code, added Fixes tag] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 09 6月, 2022 1 次提交
-
-
由 Uwe Kleine-König 提交于
A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 01 3月, 2022 1 次提交
-
-
The i2c-i801 driver invokes i2c_handle_smbus_host_notify() from his interrupt service routine. On PREEMPT_RT i2c-i801's handler is forced threaded with enabled interrupts which leads to a warning by handle_irq_event_percpu() assuming that irq_default_primary_handler() enabled interrupts. i2c-i801's interrupt handler can't be made non-threaded because the interrupt line is shared with other devices. Use generic_handle_irq_safe() which can invoked with disabled and enabled interrupts. Reported-by: NMichael Below <below@judiz.de> Link: https://bugs.debian.org/1002537Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: NOleksandr Natalenko <oleksandr@natalenko.name> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 29 1月, 2022 1 次提交
-
-
由 Akhil R 提交于
Change of_*() functions to device_*() for firmware agnostic usage. This allows to have the smbus_alert interrupt without any changes in the controller drivers using the ACPI table. Signed-off-by: NAkhil R <akhilrajeev@nvidia.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 08 1月, 2022 1 次提交
-
-
由 Wolfram Sang 提交于
This largely reverts commit 5a7b95fb. It breaks suspend with AMD GPUs, and we couldn't incrementally fix it. So, let's remove the code and go back to the drawing board. We keep the header extension to not break drivers already populating the regulator. We expect to re-add the code handling it soon. Fixes: 5a7b95fb ("i2c: core: support bus regulator controlling in adapter") Reported-by: N"Tareque Md.Hanif" <tarequemd.hanif@yahoo.com> Link: https://lore.kernel.org/r/1295184560.182511.1639075777725@mail.yahoo.comReported-by: NKonstantin Kharlamov <hi-angel@yandex.ru> Link: https://lore.kernel.org/r/7143a7147978f4104171072d9f5225d2ce355ec1.camel@yandex.ru BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1850Tested-by: N"Tareque Md.Hanif" <tarequemd.hanif@yahoo.com> Tested-by: NKonstantin Kharlamov <hi-angel@yandex.ru> Signed-off-by: NWolfram Sang <wsa@kernel.org> Cc: <stable@vger.kernel.org> # 5.14+
-
- 30 11月, 2021 2 次提交
-
-
由 Derek Basehore 提交于
This enables the async suspend for i2c client devices. This reduces the suspend/resume time considerably on platforms where i2c devices can take a lot of time (hundreds of ms) to resume. Signed-off-by: NDerek Basehore <dbasehore@chromium.org> Signed-off-by: NRajat Jain <rajatja@google.com> Tested-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Rajat Jain 提交于
Enable async suspend/resume of i2c adapters. It enormously helps with reducing the resume time of systems (as much as 20%-40%) where I2C devices can take significant time (100s of ms) to resume. Signed-off-by: NRajat Jain <rajatja@google.com> Tested-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 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>
-
- 21 7月, 2021 1 次提交
-
-
由 Uwe Kleine-König 提交于
The driver core ignores the return value of this callback because there is only little it can do when a device disappears. This is the final bit of a long lasting cleanup quest where several buses were converted to also return void from their remove callback. Additionally some resource leaks were fixed that were caused by drivers returning an error code in the expectation that the driver won't go away. With struct bus_type::remove returning void it's prevented that newly implemented buses return an ignored error code and so don't anticipate wrong expectations for driver authors. Reviewed-by: Tom Rix <trix@redhat.com> (For fpga) Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Cornelia Huck <cohuck@redhat.com> (For drivers/s390 and drivers/vfio) Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts) Acked-by: NMark Brown <broonie@kernel.org> Acked-by: Chen-Yu Tsai <wens@csie.org> (for sunxi-rsb) Acked-by: NPali Rohár <pali@kernel.org> Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for media) Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform) Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-By: NVinod Koul <vkoul@kernel.org> Acked-by: Juergen Gross <jgross@suse.com> (For xen) Acked-by: Lee Jones <lee.jones@linaro.org> (For mfd) Acked-by: Johannes Thumshirn <jth@kernel.org> (For mcb) Acked-by: NJohan Hovold <johan@kernel.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For slimbus) Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For vfio) Acked-by: NMaximilian Luz <luzmaximilian@gmail.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec) Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack) Acked-by: Geoff Levand <geoff@infradead.org> (For ps3) Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt) Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th) Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia) Acked-by: Rafael J. Wysocki <rafael@kernel.org> (For ACPI) Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr) Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (For intel-ish-hid) Acked-by: Dan Williams <dan.j.williams@intel.com> (For CXL, DAX, and NVDIMM) Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> (For isa) Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (For firewire) Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (For hid) Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> (For siox) Acked-by: Sven Van Asbroeck <TheSven73@gmail.com> (For anybuss) Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (For MMC) Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C Acked-by: NSudeep Holla <sudeep.holla@arm.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NFinn Thain <fthain@linux-m68k.org> Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 25 6月, 2021 1 次提交
-
-
由 Dmitry Torokhov 提交于
If an i2c client receives an interrupt during reboot or shutdown it may be too late to service it by making an i2c transaction on the bus because the i2c controller has already been shutdown. This can lead to system hangs if the i2c controller tries to make a transfer that is doomed to fail because the access to the i2c pins is already shut down, or an iommu translation has been torn down so i2c controller register access doesn't work. Let's simply disable the irq if there isn't a shutdown callback for an i2c client when there is an irq associated with the device. This will make sure that irqs don't come in later than the time that we can handle it. We don't do this if the i2c client device already has a shutdown callback because presumably they're doing the right thing and quieting the device so irqs don't come in after the shutdown callback returns. Reported-by: Nkernel test robot <lkp@intel.com> [swboyd@chromium.org: Dropped newline, added commit text, added interrupt.h for robot build error] Signed-off-by: NStephen Boyd <swboyd@chromium.org> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NWolfram Sang <wsa@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>
-
- 28 5月, 2021 1 次提交
-
-
由 Andy Shevchenko 提交于
One may notice that dev_printk(KERN_DEBUG ...) is *not* an equivalent to dev_dbg(). It will be printed whenever loglevel is high enough. And currently it will be the only message in the I²C core in some configurations that got printed under above conditions. Moving to dev_dbg() will hide it in the configurations where Dynamic Debug is enabled and hence align with all other debug messages in the I²C core.. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 17 4月, 2021 1 次提交
-
-
由 Tian Tao 提交于
Fix the following checkpatch error: #614: FILE: drivers/i2c/i2c-core-base.c:614: + len = acpi_device_modalias(dev, buf, PAGE_SIZE -1); ^ No functional changes. Signed-off-by: NTian Tao <tiantao6@hisilicon.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 2 次提交
-
-
由 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>
-
由 Yicong Yang 提交于
Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional change. Signed-off-by: NYicong Yang <yangyicong@hisilicon.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 31 3月, 2021 1 次提交
-
-
由 Dmitry Osipenko 提交于
The i2c_recover_bus() returns -EOPNOTSUPP if bus recovery isn't wired up by the bus driver, which the case for Tegra I2C driver for example. This error code is then propagated to I2C client and might be confusing, thus make i2c_recover_bus() to return -EBUSY instead. Suggested-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 18 3月, 2021 1 次提交
-
-
由 Wolfram Sang 提交于
In some configurations, recovery is optional. So, don't throw an error when it is not used because e.g. pinctrl settings for recovery are not provided. Reword the message and make it debug output. Reported-by: NKlaus Kudielka <klaus.kudielka@gmail.com> Tested-by: NKlaus Kudielka <klaus.kudielka@gmail.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org> Cc: stable@kernel.org
-
- 11 12月, 2020 2 次提交
-
-
由 Uwe Kleine-König 提交于
A driver remove callback is only called if the device was bound before. So it's sure that both dev and dev->driver are valid and dev is an i2c device. If the check fails something louder than "return 0" might be appropriate because the problem is grave (something like memory corruption), otherwise the check is useless. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Uwe Kleine-König 提交于
The driver core ignores the return value of struct bus_type::remove. So warn if there is an error that went unnoticed before and return 0 unconditionally in i2c_device_remove(). This prepares changing struct bus_type::remove to return void. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> [wsa: added a comment and removed unneeded initializtion] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 18 9月, 2020 1 次提交
-
-
由 Hans de Goede 提交于
Some ACPI i2c-devices _STA method (which is used to detect if the device is present) use autodetection code which probes which device is present over i2c. This requires the I2C ACPI OpRegion handler to be registered before we enumerate i2c-clients under the i2c-adapter. This fixes the i2c touchpad on the Lenovo ThinkBook 14-IIL and ThinkBook 15 IIL not getting an i2c-client instantiated and thus not working. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1842039Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 25 8月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
When commit c64ffff7 ("i2c: core: Allow empty id_table in ACPI case as well") fixed the enumeration of I²C devices on ACPI enabled platforms when driver has no ID table, it missed the PRP0001 support. i2c_device_match() and i2c_acpi_match_device() differently match driver against given device. Use acpi_driver_match_device(), that is used in the former, in i2c_device_probe() and don't fail PRP0001 enumeration when no ID table exist. Fixes: c64ffff7 ("i2c: core: Allow empty id_table in ACPI case as well") BugLink: https://stackoverflow.com/q/63519678/2511795Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 05 8月, 2020 2 次提交
-
-
由 Codrin Ciubotariu 提交于
Even if I2C bus GPIO recovery is optional, devm_gpiod_get() can return -EPROBE_DEFER, so we should at least treat that. This ends up with i2c_register_adapter() to be able to return -EPROBE_DEFER. Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 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 提交于
Let's rather use its physical parent device to give proper namings and connections in debugfs. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> 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>
-
- 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>
-
- 27 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
No need to populate a variable if it is used only in debug output which may get compiled away anyhow. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> 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>
-