Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-07i2c: amd-mp2-plat: ACPI: Use ACPI_COMPANION() directlyRafael J. Wysocki
The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION() macro and the ACPI handle produced by the former comes from the ACPI device object produced by the latter, so it is way more straightforward to evaluate the latter directly instead of passing the handle produced by the former to acpi_bus_get_device(). Modify i2c_amd_probe() accordingly (no intentional functional impact). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
2021-02-02i2c: amd-mp2: convert to PCI logging functionsRichard Neumann
Use pci_{info,warn,err,dbg} functions of the kernel's PCI API. Remove unnecessary ndev_pdev(), ndev_name() and ndev_dev() macros. While at it, remove useless __func__ from logging. Signed-off-by: Richard Neumann <mail@richard-neumann.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-09-21i2c: amd_mp2: handle num is 0 input for i2c_amd_xferTom Rix
clang static analyzer reports this problem i2c-amd-mp2-plat.c:174:9: warning: Branch condition evaluates to a garbage value return err ? err : num; ^~~ err is not initialized, it depends on the being set in the transfer loop which will not happen if num is 0. Surveying other master_xfer() implementations show all handle a 0 num. Because returning 0 is expected, initialize err to 0. Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Elie Morisse <syniurge@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-03-25i2c: drivers: Use generic definitions for bus frequenciesAndy Shevchenko
Since we have generic definitions for bus frequencies, let's use them. Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Robert Richter <rrichter@marvell.com> Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com> Acked-by: Elie Morisse <syniurge@gmail.com> Acked-by: Nehal Shah <nehal-bakulchandra.shah@amd.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Acked-by: Scott Branden <scott.branden@broadcom.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Chris Brandt <chris.brandt@renesas.com> Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Acked-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-03-25i2c: Add drivers for the AMD PCIe MP2 I2C controllerElie Morisse
MP2 controllers have two separate busses, so may accommodate up to two I2C adapters. Those adapters are listed in the ACPI namespace with the "AMDI0011" HID, and probed by a platform driver. Communication with the MP2 takes place through MMIO registers, or through DMA for more than 32 bytes transfers. This is major rework of the patch submitted by Nehal-bakulchandra Shah from AMD (https://patchwork.kernel.org/patch/10597369/). Most of the event handling of v3 was rewritten to make it work with more than one bus (e.g on Ryzen-based Lenovo Yoga 530), and this version contains many other improvements. Signed-off-by: Elie Morisse <syniurge@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>