Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 Aug 2021 21:34:01 +0000 (14:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 Aug 2021 21:34:01 +0000 (14:34 -0700)
Pull i2c updates from Wolfram Sang:
 "I2C has a smaller pull reuest this time:

   - new driver for I2C virtio

   - removal of PMC SMP driver because platform is already gone

   - IRQ probing and DMAENGINE API cleanups

   - add SI metric prefix definitions to units.h

   - beginning of i801 refactorization

   - a few driver improvements"

* 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (28 commits)
  i2c: cadence: Implement save restore
  i2c: xlp9xx: fix main IRQ check
  i2c: mt65xx: fix IRQ check
  i2c: virtio: add a virtio i2c frontend driver
  i2c: hix5hd2: fix IRQ check
  i2c: s3c2410: fix IRQ check
  i2c: iop3xx: fix deferred probing
  i2c: synquacer: fix deferred probing
  i2c: sun6i-pw2i: Prefer strscpy over strlcpy
  i2c: remove dead PMC MSP TWI/SMBus/I2C driver
  i2c: dev: Use sysfs_emit() in "show" functions
  i2c: dev: Define pr_fmt() and drop duplication substrings
  i2c: designware: Fix indentation in the header
  i2c: designware: Use DIV_ROUND_CLOSEST() macro
  units: Add SI metric prefix definitions
  i2c: at91: mark PM ops as __maybe unused
  i2c: sh_mobile: : use proper DMAENGINE API for termination
  i2c: qup: : use proper DMAENGINE API for termination
  i2c: mxs: : use proper DMAENGINE API for termination
  i2c: imx: : use proper DMAENGINE API for termination
  ...

1  2 
MAINTAINERS
drivers/i2c/i2c-dev.c

diff --combined MAINTAINERS
@@@ -3866,16 -3866,6 +3866,16 @@@ L:    bcm-kernel-feedback-list@broadcom.co
  S:    Maintained
  F:    drivers/mtd/nand/raw/brcmnand/
  
 +BROADCOM STB PCIE DRIVER
 +M:    Jim Quinlan <jim2101024@gmail.com>
 +M:    Nicolas Saenz Julienne <nsaenz@kernel.org>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
 +L:    linux-pci@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
 +F:    drivers/pci/controller/pcie-brcmstb.c
 +
  BROADCOM SYSTEMPORT ETHERNET DRIVER
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    bcm-kernel-feedback-list@broadcom.com
@@@ -4508,7 -4498,7 +4508,7 @@@ L:      clang-built-linux@googlegroups.co
  S:    Supported
  W:    https://clangbuiltlinux.github.io/
  B:    https://github.com/ClangBuiltLinux/linux/issues
 -C:    irc://chat.freenode.net/clangbuiltlinux
 +C:    irc://irc.libera.chat/clangbuiltlinux
  F:    Documentation/kbuild/llvm.rst
  F:    include/linux/compiler-clang.h
  F:    scripts/clang-tools/
@@@ -4620,7 -4610,7 +4620,7 @@@ F:      include/linux/clk
  F:    include/linux/of_clk.h
  X:    drivers/clk/clkdev.c
  
 -COMMON INTERNET FILE SYSTEM (CIFS)
 +COMMON INTERNET FILE SYSTEM CLIENT (CIFS)
  M:    Steve French <sfrench@samba.org>
  L:    linux-cifs@vger.kernel.org
  L:    samba-technical@lists.samba.org (moderated for non-subscribers)
@@@ -4629,7 -4619,6 +4629,7 @@@ W:      http://linux-cifs.samba.org
  T:    git git://git.samba.org/sfrench/cifs-2.6.git
  F:    Documentation/admin-guide/cifs/
  F:    fs/cifs/
 +F:    fs/cifs_common/
  
  COMPACTPCI HOTPLUG CORE
  M:    Scott Murray <scott@spiteful.org>
@@@ -6956,7 -6945,7 +6956,7 @@@ F:      include/uapi/linux/mdio.
  F:    include/uapi/linux/mii.h
  
  EXFAT FILE SYSTEM
 -M:    Namjae Jeon <namjae.jeon@samsung.com>
 +M:    Namjae Jeon <linkinjeon@kernel.org>
  M:    Sungjong Seo <sj1557.seo@samsung.com>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
@@@ -7869,9 -7858,9 +7869,9 @@@ S:      Maintaine
  F:    drivers/input/touchscreen/goodix.c
  
  GOOGLE ETHERNET DRIVERS
 -M:    Catherine Sullivan <csully@google.com>
 -R:    Sagi Shahar <sagis@google.com>
 -R:    Jon Olson <jonolson@google.com>
 +M:    Jeroen de Borst <jeroendb@google.com>
 +R:    Catherine Sullivan <csully@google.com>
 +R:    David Awogbemila <awogbemila@google.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    Documentation/networking/device_drivers/ethernet/google/gve.rst
@@@ -10114,17 -10103,6 +10114,17 @@@ T: git git://git.kernel.org/pub/scm/lin
  F:    Documentation/dev-tools/kselftest*
  F:    tools/testing/selftests/
  
 +KERNEL SMB3 SERVER (KSMBD)
 +M:    Namjae Jeon <linkinjeon@kernel.org>
 +M:    Sergey Senozhatsky <senozhatsky@chromium.org>
 +M:    Steve French <sfrench@samba.org>
 +M:    Hyunchul Lee <hyc.lee@gmail.com>
 +L:    linux-cifs@vger.kernel.org
 +S:    Maintained
 +T:    git git://git.samba.org/ksmbd.git
 +F:    fs/cifs_common/
 +F:    fs/ksmbd/
 +
  KERNEL UNIT TESTING FRAMEWORK (KUnit)
  M:    Brendan Higgins <brendanhiggins@google.com>
  L:    linux-kselftest@vger.kernel.org
@@@ -10631,6 -10609,15 +10631,6 @@@ F:  LICENSES
  F:    scripts/spdxcheck-test.sh
  F:    scripts/spdxcheck.py
  
 -LIGHTNVM PLATFORM SUPPORT
 -M:    Matias Bjorling <mb@lightnvm.io>
 -L:    linux-block@vger.kernel.org
 -S:    Maintained
 -W:    http://github/OpenChannelSSD
 -F:    drivers/lightnvm/
 -F:    include/linux/lightnvm.h
 -F:    include/uapi/linux/lightnvm.h
 -
  LINEAR RANGES HELPERS
  M:    Mark Brown <broonie@kernel.org>
  R:    Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
@@@ -11340,12 -11327,6 +11340,12 @@@ W: https://linuxtv.or
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/radio/radio-maxiradio*
  
 +MCBA MICROCHIP CAN BUS ANALYZER TOOL DRIVER
 +R:    Yasushi SHOJI <yashi@spacecubics.com>
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/can/usb/mcba_usb.c
 +
  MCAN MMIO DEVICE DRIVER
  M:    Chandrasekar Ramakrishnan <rcsekar@samsung.com>
  L:    linux-can@vger.kernel.org
@@@ -14443,13 -14424,6 +14443,13 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
  F:    drivers/pci/controller/dwc/pcie-histb.c
  
 +PCIE DRIVER FOR INTEL LGM GW SOC
 +M:    Rahul Tanwar <rtanwar@maxlinear.com>
 +L:    linux-pci@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/intel-gw-pcie.yaml
 +F:    drivers/pci/controller/dwc/pcie-intel-gw.c
 +
  PCIE DRIVER FOR MEDIATEK
  M:    Ryder Lee <ryder.lee@mediatek.com>
  M:    Jianjun Wang <jianjun.wang@mediatek.com>
@@@ -15494,8 -15468,6 +15494,8 @@@ M:   Pan, Xinhui <Xinhui.Pan@amd.com
  L:    amd-gfx@lists.freedesktop.org
  S:    Supported
  T:    git https://gitlab.freedesktop.org/agd5f/linux.git
 +B:    https://gitlab.freedesktop.org/drm/amd/-/issues
 +C:    irc://irc.oftc.net/radeon
  F:    drivers/gpu/drm/amd/
  F:    drivers/gpu/drm/radeon/
  F:    include/uapi/drm/amdgpu_drm.h
@@@ -15823,7 -15795,7 +15823,7 @@@ F:   Documentation/devicetree/bindings/i2
  F:    drivers/i2c/busses/i2c-emev2.c
  
  RENESAS ETHERNET DRIVERS
 -R:    Sergei Shtylyov <sergei.shtylyov@gmail.com>
 +R:    Sergey Shtylyov <s.shtylyov@omp.ru>
  L:    netdev@vger.kernel.org
  L:    linux-renesas-soc@vger.kernel.org
  F:    Documentation/devicetree/bindings/net/renesas,*.yaml
@@@ -17835,7 -17807,7 +17835,7 @@@ F:   include/linux/sync_file.
  F:    include/uapi/linux/sync_file.h
  
  SYNOPSYS ARC ARCHITECTURE
 -M:    Vineet Gupta <vgupta@synopsys.com>
 +M:    Vineet Gupta <vgupta@kernel.org>
  L:    linux-snps-arc@lists.infradead.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
@@@ -19736,6 -19708,15 +19736,15 @@@ S: Maintaine
  F:    include/uapi/linux/virtio_snd.h
  F:    sound/virtio/*
  
+ VIRTIO I2C DRIVER
+ M:    Jie Deng <jie.deng@intel.com>
+ M:    Viresh Kumar <viresh.kumar@linaro.org>
+ L:    linux-i2c@vger.kernel.org
+ L:    virtualization@lists.linux-foundation.org
+ S:    Maintained
+ F:    drivers/i2c/busses/i2c-virtio.c
+ F:    include/uapi/linux/virtio_i2c.h
  VIRTUAL BOX GUEST DEVICE DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
  M:    Arnd Bergmann <arnd@arndb.de>
@@@ -20037,8 -20018,7 +20046,8 @@@ F:   Documentation/devicetree/bindings/ex
  F:    Documentation/devicetree/bindings/mfd/wlf,arizona.yaml
  F:    Documentation/devicetree/bindings/mfd/wm831x.txt
  F:    Documentation/devicetree/bindings/regulator/wlf,arizona.yaml
 -F:    Documentation/devicetree/bindings/sound/wlf,arizona.yaml
 +F:    Documentation/devicetree/bindings/sound/wlf,*.yaml
 +F:    Documentation/devicetree/bindings/sound/wm*
  F:    Documentation/hwmon/wm83??.rst
  F:    arch/arm/mach-s3c/mach-crag6410*
  F:    drivers/clk/clk-wm83*.c
diff --combined drivers/i2c/i2c-dev.c
@@@ -14,6 -14,8 +14,8 @@@
  
  /* The I2C_RDWR ioctl code is written by Kolja Waschk <waschk@telos.de> */
  
+ #define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
  #include <linux/cdev.h>
  #include <linux/compat.h>
  #include <linux/device.h>
@@@ -68,8 -70,7 +70,7 @@@ static struct i2c_dev *get_free_i2c_dev
        struct i2c_dev *i2c_dev;
  
        if (adap->nr >= I2C_MINORS) {
-               printk(KERN_ERR "i2c-dev: Out of device minors (%d)\n",
-                      adap->nr);
+               pr_err("Out of device minors (%d)\n", adap->nr);
                return ERR_PTR(-ENODEV);
        }
  
@@@ -101,7 -102,7 +102,7 @@@ static ssize_t name_show(struct device 
  
        if (!i2c_dev)
                return -ENODEV;
-       return sprintf(buf, "%s\n", i2c_dev->adap->name);
+       return sysfs_emit(buf, "%s\n", i2c_dev->adap->name);
  }
  static DEVICE_ATTR_RO(name);
  
@@@ -141,17 -142,15 +142,16 @@@ static ssize_t i2cdev_read(struct file 
        if (count > 8192)
                count = 8192;
  
 -      tmp = kmalloc(count, GFP_KERNEL);
 +      tmp = kzalloc(count, GFP_KERNEL);
        if (tmp == NULL)
                return -ENOMEM;
  
-       pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n",
-               iminor(file_inode(file)), count);
+       pr_debug("i2c-%d reading %zu bytes.\n", iminor(file_inode(file)), count);
  
        ret = i2c_master_recv(client, tmp, count);
        if (ret >= 0)
 -              ret = copy_to_user(buf, tmp, count) ? -EFAULT : ret;
 +              if (copy_to_user(buf, tmp, ret))
 +                      ret = -EFAULT;
        kfree(tmp);
        return ret;
  }
@@@ -170,8 -169,7 +170,7 @@@ static ssize_t i2cdev_write(struct fil
        if (IS_ERR(tmp))
                return PTR_ERR(tmp);
  
-       pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n",
-               iminor(file_inode(file)), count);
+       pr_debug("i2c-%d writing %zu bytes.\n", iminor(file_inode(file)), count);
  
        ret = i2c_master_send(client, tmp, count);
        kfree(tmp);
@@@ -674,8 -672,7 +673,7 @@@ static int i2cdev_attach_adapter(struc
                return res;
        }
  
-       pr_debug("i2c-dev: adapter [%s] registered as minor %d\n",
-                adap->name, adap->nr);
+       pr_debug("adapter [%s] registered as minor %d\n", adap->name, adap->nr);
        return 0;
  }
  
@@@ -694,7 -691,7 +692,7 @@@ static int i2cdev_detach_adapter(struc
  
        put_i2c_dev(i2c_dev, true);
  
-       pr_debug("i2c-dev: adapter [%s] unregistered\n", adap->name);
+       pr_debug("adapter [%s] unregistered\n", adap->name);
        return 0;
  }
  
@@@ -727,7 -724,7 +725,7 @@@ static int __init i2c_dev_init(void
  {
        int res;
  
-       printk(KERN_INFO "i2c /dev entries driver\n");
+       pr_info("i2c /dev entries driver\n");
  
        res = register_chrdev_region(MKDEV(I2C_MAJOR, 0), I2C_MINORS, "i2c");
        if (res)
@@@ -755,7 -752,7 +753,7 @@@ out_unreg_class
  out_unreg_chrdev:
        unregister_chrdev_region(MKDEV(I2C_MAJOR, 0), I2C_MINORS);
  out:
-       printk(KERN_ERR "%s: Driver Initialisation failed\n", __FILE__);
+       pr_err("Driver Initialisation failed\n");
        return res;
  }