* remove arch/sh
From: Christoph Hellwig @ 2023-01-13 6:23 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, Arnd Bergmann, Greg Kroah-Hartman
Cc: Laurent Pinchart, Kieran Bingham, Geert Uytterhoeven,
linux-kernel, linux-watchdog, devicetree, linux-arch, dmaengine,
dri-devel, linux-renesas-soc, linux-i2c, linux-input, linux-media,
linux-mmc, linux-mtd, netdev, linux-gpio, linux-rtc, linux-spi,
linux-serial, linux-usb, linux-fbdev, alsa-devel, linux-sh
Hi all,
arch/sh has been a long drag because it supports a lot of SOCs, and most
of them haven't even been converted to device tree infrastructure. These
SOCs are generally obsolete as well, and all of the support has been barely
maintained for almost 10 years, and not at all for more than 1 year.
Drop arch/sh and everything that depends on it.
Diffstat:
Documentation/sh/booting.rst | 12
Documentation/sh/features.rst | 3
Documentation/sh/index.rst | 56
Documentation/sh/new-machine.rst | 277 -
Documentation/sh/register-banks.rst | 40
arch/sh/Kbuild | 7
arch/sh/Kconfig | 793 ----
arch/sh/Kconfig.cpu | 100
arch/sh/Kconfig.debug | 78
arch/sh/Makefile | 215 -
arch/sh/boards/Kconfig | 400 --
arch/sh/boards/Makefile | 20
arch/sh/boards/board-apsh4a3a.c | 182
arch/sh/boards/board-apsh4ad0a.c | 132
arch/sh/boards/board-edosk7705.c | 79
arch/sh/boards/board-edosk7760.c | 178
arch/sh/boards/board-espt.c | 105
arch/sh/boards/board-magicpanelr2.c | 390 --
arch/sh/boards/board-polaris.c | 156
arch/sh/boards/board-secureedge5410.c | 75
arch/sh/boards/board-sh2007.c | 146
arch/sh/boards/board-sh7757lcr.c | 604 ---
arch/sh/boards/board-sh7785lcr.c | 384 --
arch/sh/boards/board-shmin.c | 35
arch/sh/boards/board-titan.c | 21
arch/sh/boards/board-urquell.c | 218 -
arch/sh/boards/mach-ap325rxa/Makefile | 3
arch/sh/boards/mach-ap325rxa/sdram.S | 66
arch/sh/boards/mach-ap325rxa/setup.c | 573 ---
arch/sh/boards/mach-dreamcast/Makefile | 7
arch/sh/boards/mach-dreamcast/irq.c | 155
arch/sh/boards/mach-dreamcast/rtc.c | 96
arch/sh/boards/mach-dreamcast/setup.c | 39
arch/sh/boards/mach-ecovec24/Makefile | 10
arch/sh/boards/mach-ecovec24/sdram.S | 108
arch/sh/boards/mach-ecovec24/setup.c | 1521 --------
arch/sh/boards/mach-highlander/Kconfig | 26
arch/sh/boards/mach-highlander/Makefile | 12
arch/sh/boards/mach-highlander/irq-r7780mp.c | 71
arch/sh/boards/mach-highlander/irq-r7780rp.c | 64
arch/sh/boards/mach-highlander/irq-r7785rp.c | 83
arch/sh/boards/mach-highlander/pinmux-r7785rp.c | 17
arch/sh/boards/mach-highlander/psw.c | 119
arch/sh/boards/mach-highlander/setup.c | 416 --
arch/sh/boards/mach-hp6xx/Makefile | 8
arch/sh/boards/mach-hp6xx/hp6xx_apm.c | 109
arch/sh/boards/mach-hp6xx/pm.c | 156
arch/sh/boards/mach-hp6xx/pm_wakeup.S | 39
arch/sh/boards/mach-hp6xx/setup.c | 172
arch/sh/boards/mach-kfr2r09/Makefile | 5
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 275 -
arch/sh/boards/mach-kfr2r09/sdram.S | 77
arch/sh/boards/mach-kfr2r09/setup.c | 649 ---
arch/sh/boards/mach-landisk/Makefile | 6
arch/sh/boards/mach-landisk/gio.c | 164
arch/sh/boards/mach-landisk/irq.c | 63
arch/sh/boards/mach-landisk/psw.c | 140
arch/sh/boards/mach-landisk/setup.c | 102
arch/sh/boards/mach-lboxre2/Makefile | 6
arch/sh/boards/mach-lboxre2/irq.c | 27
arch/sh/boards/mach-lboxre2/setup.c | 79
arch/sh/boards/mach-microdev/Makefile | 6
arch/sh/boards/mach-microdev/fdc37c93xapm.c | 157
arch/sh/boards/mach-microdev/io.c | 123
arch/sh/boards/mach-microdev/irq.c | 150
arch/sh/boards/mach-microdev/setup.c | 197 -
arch/sh/boards/mach-migor/Kconfig | 16
arch/sh/boards/mach-migor/Makefile | 3
arch/sh/boards/mach-migor/lcd_qvga.c | 163
arch/sh/boards/mach-migor/sdram.S | 66
arch/sh/boards/mach-migor/setup.c | 649 ---
arch/sh/boards/mach-r2d/Kconfig | 24
arch/sh/boards/mach-r2d/Makefile | 6
arch/sh/boards/mach-r2d/irq.c | 156
arch/sh/boards/mach-r2d/setup.c | 305 -
arch/sh/boards/mach-rsk/Kconfig | 29
arch/sh/boards/mach-rsk/Makefile | 5
arch/sh/boards/mach-rsk/devices-rsk7203.c | 137
arch/sh/boards/mach-rsk/devices-rsk7264.c | 55
arch/sh/boards/mach-rsk/devices-rsk7269.c | 57
arch/sh/boards/mach-rsk/setup.c | 84
arch/sh/boards/mach-sdk7780/Kconfig | 17
arch/sh/boards/mach-sdk7780/Makefile | 6
arch/sh/boards/mach-sdk7780/irq.c | 43
arch/sh/boards/mach-sdk7780/setup.c | 96
arch/sh/boards/mach-sdk7786/Makefile | 5
arch/sh/boards/mach-sdk7786/fpga.c | 69
arch/sh/boards/mach-sdk7786/gpio.c | 46
arch/sh/boards/mach-sdk7786/irq.c | 45
arch/sh/boards/mach-sdk7786/nmi.c | 80
arch/sh/boards/mach-sdk7786/setup.c | 266 -
arch/sh/boards/mach-sdk7786/sram.c | 69
arch/sh/boards/mach-se/7206/Makefile | 6
arch/sh/boards/mach-se/7206/irq.c | 151
arch/sh/boards/mach-se/7206/setup.c | 96
arch/sh/boards/mach-se/7343/Makefile | 6
arch/sh/boards/mach-se/7343/irq.c | 123
arch/sh/boards/mach-se/7343/setup.c | 182
arch/sh/boards/mach-se/770x/Makefile | 6
arch/sh/boards/mach-se/770x/irq.c | 109
arch/sh/boards/mach-se/770x/setup.c | 205 -
arch/sh/boards/mach-se/7721/Makefile | 2
arch/sh/boards/mach-se/7721/irq.c | 42
arch/sh/boards/mach-se/7721/setup.c | 92
arch/sh/boards/mach-se/7722/Makefile | 11
arch/sh/boards/mach-se/7722/irq.c | 116
arch/sh/boards/mach-se/7722/setup.c | 190
arch/sh/boards/mach-se/7724/Makefile | 11
arch/sh/boards/mach-se/7724/irq.c | 143
arch/sh/boards/mach-se/7724/sdram.S | 128
arch/sh/boards/mach-se/7724/setup.c | 986 -----
arch/sh/boards/mach-se/7751/Makefile | 6
arch/sh/boards/mach-se/7751/irq.c | 51
arch/sh/boards/mach-se/7751/setup.c | 60
arch/sh/boards/mach-se/7780/Makefile | 11
arch/sh/boards/mach-se/7780/irq.c | 65
arch/sh/boards/mach-se/7780/setup.c | 111
arch/sh/boards/mach-se/Makefile | 11
arch/sh/boards/mach-se/board-se7619.c | 27
arch/sh/boards/mach-sh03/Makefile | 7
arch/sh/boards/mach-sh03/rtc.c | 143
arch/sh/boards/mach-sh03/setup.c | 97
arch/sh/boards/mach-sh7763rdp/Makefile | 2
arch/sh/boards/mach-sh7763rdp/irq.c | 42
arch/sh/boards/mach-sh7763rdp/setup.c | 213 -
arch/sh/boards/mach-x3proto/Makefile | 4
arch/sh/boards/mach-x3proto/gpio.c | 136
arch/sh/boards/mach-x3proto/ilsel.c | 156
arch/sh/boards/mach-x3proto/setup.c | 270 -
arch/sh/boards/of-generic.c | 172
arch/sh/boot/.gitignore | 5
arch/sh/boot/Makefile | 115
arch/sh/boot/compressed/.gitignore | 2
arch/sh/boot/compressed/Makefile | 66
arch/sh/boot/compressed/ashiftrt.S | 2
arch/sh/boot/compressed/ashldi3.c | 2
arch/sh/boot/compressed/ashlsi3.S | 2
arch/sh/boot/compressed/ashrsi3.S | 2
arch/sh/boot/compressed/cache.c | 13
arch/sh/boot/compressed/head_32.S | 126
arch/sh/boot/compressed/head_64.S | 159
arch/sh/boot/compressed/lshrsi3.S | 2
arch/sh/boot/compressed/misc.c | 146
arch/sh/boot/compressed/vmlinux.scr | 10
arch/sh/boot/dts/Makefile | 2
arch/sh/boot/dts/j2_mimas_v2.dts | 99
arch/sh/boot/romimage/Makefile | 30
arch/sh/boot/romimage/head.S | 85
arch/sh/boot/romimage/mmcif-sh7724.c | 78
arch/sh/boot/romimage/vmlinux.scr | 8
arch/sh/cchips/Kconfig | 46
arch/sh/cchips/hd6446x/Makefile | 4
arch/sh/cchips/hd6446x/hd64461.c | 112
arch/sh/configs/ap325rxa_defconfig | 103
arch/sh/configs/apsh4a3a_defconfig | 91
arch/sh/configs/apsh4ad0a_defconfig | 122
arch/sh/configs/dreamcast_defconfig | 72
arch/sh/configs/ecovec24-romimage_defconfig | 58
arch/sh/configs/ecovec24_defconfig | 132
arch/sh/configs/edosk7705_defconfig | 35
arch/sh/configs/edosk7760_defconfig | 114
arch/sh/configs/espt_defconfig | 114
arch/sh/configs/hp6xx_defconfig | 60
arch/sh/configs/j2_defconfig | 42
arch/sh/configs/kfr2r09-romimage_defconfig | 53
arch/sh/configs/kfr2r09_defconfig | 84
arch/sh/configs/landisk_defconfig | 115
arch/sh/configs/lboxre2_defconfig | 62
arch/sh/configs/magicpanelr2_defconfig | 90
arch/sh/configs/microdev_defconfig | 43
arch/sh/configs/migor_defconfig | 94
arch/sh/configs/polaris_defconfig | 83
arch/sh/configs/r7780mp_defconfig | 109
arch/sh/configs/r7785rp_defconfig | 107
arch/sh/configs/rsk7201_defconfig | 63
arch/sh/configs/rsk7203_defconfig | 121
arch/sh/configs/rsk7264_defconfig | 71
arch/sh/configs/rsk7269_defconfig | 56
arch/sh/configs/rts7751r2d1_defconfig | 91
arch/sh/configs/rts7751r2dplus_defconfig | 96
arch/sh/configs/sdk7780_defconfig | 139
arch/sh/configs/sdk7786_defconfig | 217 -
arch/sh/configs/se7206_defconfig | 108
arch/sh/configs/se7343_defconfig | 96
arch/sh/configs/se7619_defconfig | 43
arch/sh/configs/se7705_defconfig | 54
arch/sh/configs/se7712_defconfig | 101
arch/sh/configs/se7721_defconfig | 127
arch/sh/configs/se7722_defconfig | 56
arch/sh/configs/se7724_defconfig | 132
arch/sh/configs/se7750_defconfig | 55
arch/sh/configs/se7751_defconfig | 46
arch/sh/configs/se7780_defconfig | 106
arch/sh/configs/secureedge5410_defconfig | 53
arch/sh/configs/sh03_defconfig | 126
arch/sh/configs/sh2007_defconfig | 199 -
arch/sh/configs/sh7710voipgw_defconfig | 55
arch/sh/configs/sh7724_generic_defconfig | 41
arch/sh/configs/sh7757lcr_defconfig | 85
arch/sh/configs/sh7763rdp_defconfig | 116
arch/sh/configs/sh7770_generic_defconfig | 43
arch/sh/configs/sh7785lcr_32bit_defconfig | 149
arch/sh/configs/sh7785lcr_defconfig | 117
arch/sh/configs/shmin_defconfig | 52
arch/sh/configs/shx3_defconfig | 103
arch/sh/configs/titan_defconfig | 272 -
arch/sh/configs/ul2_defconfig | 84
arch/sh/configs/urquell_defconfig | 147
arch/sh/drivers/Kconfig | 20
arch/sh/drivers/Makefile | 11
arch/sh/drivers/dma/Kconfig | 74
arch/sh/drivers/dma/Makefile | 9
arch/sh/drivers/dma/dma-api.c | 417 --
arch/sh/drivers/dma/dma-g2.c | 197 -
arch/sh/drivers/dma/dma-pvr2.c | 102
arch/sh/drivers/dma/dma-sh.c | 414 --
arch/sh/drivers/dma/dma-sysfs.c | 164
arch/sh/drivers/dma/dmabrg.c | 196 -
arch/sh/drivers/heartbeat.c | 152
arch/sh/drivers/pci/Makefile | 27
arch/sh/drivers/pci/common.c | 159
arch/sh/drivers/pci/fixups-dreamcast.c | 84
arch/sh/drivers/pci/fixups-landisk.c | 57
arch/sh/drivers/pci/fixups-r7780rp.c | 18
arch/sh/drivers/pci/fixups-rts7751r2d.c | 64
arch/sh/drivers/pci/fixups-sdk7780.c | 40
arch/sh/drivers/pci/fixups-sdk7786.c | 64
arch/sh/drivers/pci/fixups-se7751.c | 113
arch/sh/drivers/pci/fixups-sh03.c | 33
arch/sh/drivers/pci/fixups-snapgear.c | 37
arch/sh/drivers/pci/fixups-titan.c | 36
arch/sh/drivers/pci/ops-dreamcast.c | 79
arch/sh/drivers/pci/ops-sh4.c | 105
arch/sh/drivers/pci/ops-sh7786.c | 168
arch/sh/drivers/pci/pci-dreamcast.c | 97
arch/sh/drivers/pci/pci-sh4.h | 182
arch/sh/drivers/pci/pci-sh7751.c | 179
arch/sh/drivers/pci/pci-sh7751.h | 126
arch/sh/drivers/pci/pci-sh7780.c | 407 --
arch/sh/drivers/pci/pci-sh7780.h | 43
arch/sh/drivers/pci/pci.c | 298 -
arch/sh/drivers/pci/pcie-sh7786.c | 609 ---
arch/sh/drivers/pci/pcie-sh7786.h | 577 ---
arch/sh/drivers/platform_early.c | 340 -
arch/sh/drivers/push-switch.c | 136
arch/sh/drivers/superhyway/Makefile | 7
arch/sh/drivers/superhyway/ops-sh4-202.c | 168
arch/sh/include/asm/Kbuild | 5
arch/sh/include/asm/adc.h | 12
arch/sh/include/asm/addrspace.h | 63
arch/sh/include/asm/alignment.h | 22
arch/sh/include/asm/asm-offsets.h | 2
arch/sh/include/asm/atomic-grb.h | 86
arch/sh/include/asm/atomic-irq.h | 72
arch/sh/include/asm/atomic-llsc.h | 88
arch/sh/include/asm/atomic.h | 38
arch/sh/include/asm/barrier.h | 45
arch/sh/include/asm/bitops-cas.h | 94
arch/sh/include/asm/bitops-grb.h | 173
arch/sh/include/asm/bitops-llsc.h | 147
arch/sh/include/asm/bitops-op32.h | 143
arch/sh/include/asm/bitops.h | 72
arch/sh/include/asm/bl_bit.h | 2
arch/sh/include/asm/bl_bit_32.h | 34
arch/sh/include/asm/bug.h | 121
arch/sh/include/asm/bugs.h | 74
arch/sh/include/asm/cache.h | 46
arch/sh/include/asm/cache_insns.h | 2
arch/sh/include/asm/cache_insns_32.h | 22
arch/sh/include/asm/cacheflush.h | 106
arch/sh/include/asm/checksum.h | 2
arch/sh/include/asm/checksum_32.h | 203 -
arch/sh/include/asm/clock.h | 17
arch/sh/include/asm/cmpxchg-cas.h | 25
arch/sh/include/asm/cmpxchg-grb.h | 95
arch/sh/include/asm/cmpxchg-irq.h | 54
arch/sh/include/asm/cmpxchg-llsc.h | 53
arch/sh/include/asm/cmpxchg-xchg.h | 50
arch/sh/include/asm/cmpxchg.h | 74
arch/sh/include/asm/device.h | 17
arch/sh/include/asm/dma-register.h | 50
arch/sh/include/asm/dma.h | 140
arch/sh/include/asm/dmabrg.h | 24
arch/sh/include/asm/dwarf.h | 417 --
arch/sh/include/asm/elf.h | 211 -
arch/sh/include/asm/entry-macros.S | 123
arch/sh/include/asm/extable.h | 7
arch/sh/include/asm/fb.h | 20
arch/sh/include/asm/fixmap.h | 86
arch/sh/include/asm/flat.h | 33
arch/sh/include/asm/fpu.h | 69
arch/sh/include/asm/freq.h | 12
arch/sh/include/asm/ftrace.h | 48
arch/sh/include/asm/futex-cas.h | 35
arch/sh/include/asm/futex-irq.h | 25
arch/sh/include/asm/futex-llsc.h | 42
arch/sh/include/asm/futex.h | 72
arch/sh/include/asm/gpio.h | 50
arch/sh/include/asm/hardirq.h | 11
arch/sh/include/asm/hd64461.h | 252 -
arch/sh/include/asm/heartbeat.h | 19
arch/sh/include/asm/hugetlb.h | 38
arch/sh/include/asm/hw_breakpoint.h | 70
arch/sh/include/asm/hw_irq.h | 36
arch/sh/include/asm/i2c-sh7760.h | 21
arch/sh/include/asm/io.h | 294 -
arch/sh/include/asm/io_generic.h | 19
arch/sh/include/asm/io_noioport.h | 86
arch/sh/include/asm/io_trapped.h | 59
arch/sh/include/asm/irq.h | 58
arch/sh/include/asm/irqflags.h | 10
arch/sh/include/asm/kdebug.h | 19
arch/sh/include/asm/kexec.h | 72
arch/sh/include/asm/kgdb.h | 38
arch/sh/include/asm/kprobes.h | 57
arch/sh/include/asm/linkage.h | 8
arch/sh/include/asm/machvec.h | 41
arch/sh/include/asm/mmiowb.h | 12
arch/sh/include/asm/mmu.h | 107
arch/sh/include/asm/mmu_context.h | 178
arch/sh/include/asm/mmu_context_32.h | 51
arch/sh/include/asm/mmzone.h | 45
arch/sh/include/asm/module.h | 14
arch/sh/include/asm/page.h | 186
arch/sh/include/asm/pci.h | 91
arch/sh/include/asm/perf_event.h | 30
arch/sh/include/asm/pgalloc.h | 40
arch/sh/include/asm/pgtable-2level.h | 24
arch/sh/include/asm/pgtable-3level.h | 59
arch/sh/include/asm/pgtable.h | 150
arch/sh/include/asm/pgtable_32.h | 462 --
arch/sh/include/asm/platform_early.h | 61
arch/sh/include/asm/posix_types.h | 2
arch/sh/include/asm/processor.h | 173
arch/sh/include/asm/processor_32.h | 202 -
arch/sh/include/asm/ptrace.h | 139
arch/sh/include/asm/ptrace_32.h | 14
arch/sh/include/asm/push-switch.h | 32
arch/sh/include/asm/reboot.h | 22
arch/sh/include/asm/romimage-macros.h | 74
arch/sh/include/asm/rtc.h | 15
arch/sh/include/asm/seccomp.h | 21
arch/sh/include/asm/sections.h | 12
arch/sh/include/asm/setup.h | 25
arch/sh/include/asm/sfp-machine.h | 80
arch/sh/include/asm/sh7760fb.h | 198 -
arch/sh/include/asm/sh_bios.h | 28
arch/sh/include/asm/shmparam.h | 19
arch/sh/include/asm/siu.h | 20
arch/sh/include/asm/smc37c93x.h | 191 -
arch/sh/include/asm/smp-ops.h | 52
arch/sh/include/asm/smp.h | 83
arch/sh/include/asm/sparsemem.h | 12
arch/sh/include/asm/spi.h | 14
arch/sh/include/asm/spinlock-cas.h | 89
arch/sh/include/asm/spinlock-llsc.h | 198 -
arch/sh/include/asm/spinlock.h | 19
arch/sh/include/asm/spinlock_types.h | 22
arch/sh/include/asm/sram.h | 39
arch/sh/include/asm/stackprotector.h | 21
arch/sh/include/asm/stacktrace.h | 21
arch/sh/include/asm/string.h | 2
arch/sh/include/asm/string_32.h | 102
arch/sh/include/asm/suspend.h | 97
arch/sh/include/asm/switch_to.h | 7
arch/sh/include/asm/switch_to_32.h | 131
arch/sh/include/asm/syscall.h | 9
arch/sh/include/asm/syscall_32.h | 69
arch/sh/include/asm/syscalls.h | 14
arch/sh/include/asm/syscalls_32.h | 27
arch/sh/include/asm/thread_info.h | 171
arch/sh/include/asm/timex.h | 24
arch/sh/include/asm/tlb.h | 29
arch/sh/include/asm/tlbflush.h | 52
arch/sh/include/asm/topology.h | 28
arch/sh/include/asm/traps.h | 18
arch/sh/include/asm/traps_32.h | 61
arch/sh/include/asm/types.h | 16
arch/sh/include/asm/uaccess.h | 133
arch/sh/include/asm/uaccess_32.h | 227 -
arch/sh/include/asm/uncached.h | 59
arch/sh/include/asm/unistd.h | 31
arch/sh/include/asm/unwinder.h | 32
arch/sh/include/asm/user.h | 55
arch/sh/include/asm/vermagic.h | 30
arch/sh/include/asm/vga.h | 7
arch/sh/include/asm/vmalloc.h | 4
arch/sh/include/asm/vmlinux.lds.h | 18
arch/sh/include/asm/watchdog.h | 159
arch/sh/include/asm/word-at-a-time.h | 54
arch/sh/include/cpu-common/cpu/addrspace.h | 16
arch/sh/include/cpu-common/cpu/mmu_context.h | 13
arch/sh/include/cpu-common/cpu/pfc.h | 18
arch/sh/include/cpu-common/cpu/rtc.h | 9
arch/sh/include/cpu-common/cpu/sigcontext.h | 18
arch/sh/include/cpu-common/cpu/timer.h | 7
arch/sh/include/cpu-sh2/cpu/cache.h | 40
arch/sh/include/cpu-sh2/cpu/freq.h | 15
arch/sh/include/cpu-sh2/cpu/watchdog.h | 66
arch/sh/include/cpu-sh2a/cpu/addrspace.h | 11
arch/sh/include/cpu-sh2a/cpu/cache.h | 40
arch/sh/include/cpu-sh2a/cpu/freq.h | 13
arch/sh/include/cpu-sh2a/cpu/rtc.h | 9
arch/sh/include/cpu-sh2a/cpu/sh7203.h | 144
arch/sh/include/cpu-sh2a/cpu/sh7264.h | 169
arch/sh/include/cpu-sh2a/cpu/sh7269.h | 213 -
arch/sh/include/cpu-sh2a/cpu/watchdog.h | 2
arch/sh/include/cpu-sh3/cpu/adc.h | 29
arch/sh/include/cpu-sh3/cpu/cache.h | 40
arch/sh/include/cpu-sh3/cpu/dac.h | 42
arch/sh/include/cpu-sh3/cpu/dma-register.h | 38
arch/sh/include/cpu-sh3/cpu/dma.h | 19
arch/sh/include/cpu-sh3/cpu/freq.h | 24
arch/sh/include/cpu-sh3/cpu/gpio.h | 78
arch/sh/include/cpu-sh3/cpu/mmu_context.h | 42
arch/sh/include/cpu-sh3/cpu/serial.h | 11
arch/sh/include/cpu-sh3/cpu/sh7720.h | 175
arch/sh/include/cpu-sh3/cpu/watchdog.h | 22
arch/sh/include/cpu-sh4/cpu/addrspace.h | 41
arch/sh/include/cpu-sh4/cpu/cache.h | 41
arch/sh/include/cpu-sh4/cpu/dma-register.h | 98
arch/sh/include/cpu-sh4/cpu/dma.h | 18
arch/sh/include/cpu-sh4/cpu/fpu.h | 30
arch/sh/include/cpu-sh4/cpu/freq.h | 74
arch/sh/include/cpu-sh4/cpu/mmu_context.h | 79
arch/sh/include/cpu-sh4/cpu/rtc.h | 14
arch/sh/include/cpu-sh4/cpu/sh7722.h | 252 -
arch/sh/include/cpu-sh4/cpu/sh7723.h | 285 -
arch/sh/include/cpu-sh4/cpu/sh7724.h | 319 -
arch/sh/include/cpu-sh4/cpu/sh7734.h | 307 -
arch/sh/include/cpu-sh4/cpu/sh7757.h | 290 -
arch/sh/include/cpu-sh4/cpu/sh7785.h | 260 -
arch/sh/include/cpu-sh4/cpu/sh7786.h | 138
arch/sh/include/cpu-sh4/cpu/shx3.h | 65
arch/sh/include/cpu-sh4/cpu/sigcontext.h | 25
arch/sh/include/cpu-sh4/cpu/sq.h | 33
arch/sh/include/cpu-sh4/cpu/watchdog.h | 41
arch/sh/include/cpu-sh4a/cpu/dma.h | 72
arch/sh/include/cpu-sh4a/cpu/serial.h | 8
arch/sh/include/mach-common/mach/highlander.h | 208 -
arch/sh/include/mach-common/mach/hp6xx.h | 59
arch/sh/include/mach-common/mach/lboxre2.h | 24
arch/sh/include/mach-common/mach/magicpanelr2.h | 64
arch/sh/include/mach-common/mach/mangle-port.h | 46
arch/sh/include/mach-common/mach/microdev.h | 69
arch/sh/include/mach-common/mach/r2d.h | 71
arch/sh/include/mach-common/mach/romimage.h | 12
arch/sh/include/mach-common/mach/sdk7780.h | 79
arch/sh/include/mach-common/mach/secureedge5410.h | 47
arch/sh/include/mach-common/mach/sh2007.h | 118
arch/sh/include/mach-common/mach/sh7763rdp.h | 50
arch/sh/include/mach-common/mach/sh7785lcr.h | 58
arch/sh/include/mach-common/mach/shmin.h | 10
arch/sh/include/mach-common/mach/titan.h | 20
arch/sh/include/mach-common/mach/urquell.h | 69
arch/sh/include/mach-dreamcast/mach/dma.h | 29
arch/sh/include/mach-dreamcast/mach/maple.h | 38
arch/sh/include/mach-dreamcast/mach/pci.h | 24
arch/sh/include/mach-dreamcast/mach/sysasic.h | 46
arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt | 82
arch/sh/include/mach-ecovec24/mach/romimage.h | 48
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h | 24
arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt | 144
arch/sh/include/mach-kfr2r09/mach/romimage.h | 31
arch/sh/include/mach-landisk/mach/gio.h | 38
arch/sh/include/mach-landisk/mach/iodata_landisk.h | 46
arch/sh/include/mach-migor/mach/migor.h | 16
arch/sh/include/mach-sdk7786/mach/fpga.h | 156
arch/sh/include/mach-sdk7786/mach/irq.h | 8
arch/sh/include/mach-se/mach/mrshpc.h | 53
arch/sh/include/mach-se/mach/se.h | 120
arch/sh/include/mach-se/mach/se7206.h | 14
arch/sh/include/mach-se/mach/se7343.h | 143
arch/sh/include/mach-se/mach/se7721.h | 68
arch/sh/include/mach-se/mach/se7722.h | 98
arch/sh/include/mach-se/mach/se7724.h | 69
arch/sh/include/mach-se/mach/se7751.h | 75
arch/sh/include/mach-se/mach/se7780.h | 106
arch/sh/include/mach-sh03/mach/io.h | 26
arch/sh/include/mach-sh03/mach/sh03.h | 19
arch/sh/include/mach-x3proto/mach/hardware.h | 13
arch/sh/include/mach-x3proto/mach/ilsel.h | 46
arch/sh/include/uapi/asm/Kbuild | 4
arch/sh/include/uapi/asm/auxvec.h | 39
arch/sh/include/uapi/asm/byteorder.h | 11
arch/sh/include/uapi/asm/cachectl.h | 20
arch/sh/include/uapi/asm/cpu-features.h | 28
arch/sh/include/uapi/asm/hw_breakpoint.h | 5
arch/sh/include/uapi/asm/ioctls.h | 116
arch/sh/include/uapi/asm/posix_types.h | 2
arch/sh/include/uapi/asm/posix_types_32.h | 23
arch/sh/include/uapi/asm/ptrace.h | 30
arch/sh/include/uapi/asm/ptrace_32.h | 78
arch/sh/include/uapi/asm/sigcontext.h | 25
arch/sh/include/uapi/asm/signal.h | 18
arch/sh/include/uapi/asm/sockios.h | 18
arch/sh/include/uapi/asm/stat.h | 78
arch/sh/include/uapi/asm/swab.h | 50
arch/sh/include/uapi/asm/unistd.h | 2
arch/sh/kernel/.gitignore | 2
arch/sh/kernel/Makefile | 49
arch/sh/kernel/asm-offsets.c | 60
arch/sh/kernel/cpu/Makefile | 21
arch/sh/kernel/cpu/adc.c | 37
arch/sh/kernel/cpu/clock-cpg.c | 78
arch/sh/kernel/cpu/clock.c | 52
arch/sh/kernel/cpu/fpu.c | 92
arch/sh/kernel/cpu/init.c | 366 -
arch/sh/kernel/cpu/irq/Makefile | 6
arch/sh/kernel/cpu/irq/imask.c | 85
arch/sh/kernel/cpu/irq/ipr.c | 80
arch/sh/kernel/cpu/pfc.c | 25
arch/sh/kernel/cpu/proc.c | 151
arch/sh/kernel/cpu/sh2/Makefile | 12
arch/sh/kernel/cpu/sh2/clock-sh7619.c | 74
arch/sh/kernel/cpu/sh2/entry.S | 373 -
arch/sh/kernel/cpu/sh2/ex.S | 44
arch/sh/kernel/cpu/sh2/probe.c | 71
arch/sh/kernel/cpu/sh2/setup-sh7619.c | 205 -
arch/sh/kernel/cpu/sh2/smp-j2.c | 136
arch/sh/kernel/cpu/sh2a/Makefile | 25
arch/sh/kernel/cpu/sh2a/clock-sh7201.c | 82
arch/sh/kernel/cpu/sh2a/clock-sh7203.c | 78
arch/sh/kernel/cpu/sh2a/clock-sh7206.c | 80
arch/sh/kernel/cpu/sh2a/clock-sh7264.c | 157
arch/sh/kernel/cpu/sh2a/clock-sh7269.c | 181
arch/sh/kernel/cpu/sh2a/entry.S | 247 -
arch/sh/kernel/cpu/sh2a/ex.S | 70
arch/sh/kernel/cpu/sh2a/fpu.c | 572 ---
arch/sh/kernel/cpu/sh2a/opcode_helper.c | 51
arch/sh/kernel/cpu/sh2a/pinmux-sh7203.c | 27
arch/sh/kernel/cpu/sh2a/pinmux-sh7264.c | 27
arch/sh/kernel/cpu/sh2a/pinmux-sh7269.c | 28
arch/sh/kernel/cpu/sh2a/probe.c | 57
arch/sh/kernel/cpu/sh2a/setup-mxg.c | 175
arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 418 --
arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 355 -
arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 291 -
arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 552 --
arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 568 --
arch/sh/kernel/cpu/sh3/Makefile | 34
arch/sh/kernel/cpu/sh3/clock-sh3.c | 86
arch/sh/kernel/cpu/sh3/clock-sh7705.c | 81
arch/sh/kernel/cpu/sh3/clock-sh7706.c | 81
arch/sh/kernel/cpu/sh3/clock-sh7709.c | 82
arch/sh/kernel/cpu/sh3/clock-sh7710.c | 75
arch/sh/kernel/cpu/sh3/clock-sh7712.c | 68
arch/sh/kernel/cpu/sh3/entry.S | 509 --
arch/sh/kernel/cpu/sh3/ex.S | 56
arch/sh/kernel/cpu/sh3/pinmux-sh7720.c | 27
arch/sh/kernel/cpu/sh3/probe.c | 108
arch/sh/kernel/cpu/sh3/serial-sh770x.c | 34
arch/sh/kernel/cpu/sh3/serial-sh7710.c | 21
arch/sh/kernel/cpu/sh3/serial-sh7720.c | 38
arch/sh/kernel/cpu/sh3/setup-sh3.c | 69
arch/sh/kernel/cpu/sh3/setup-sh7705.c | 190
arch/sh/kernel/cpu/sh3/setup-sh770x.c | 246 -
arch/sh/kernel/cpu/sh3/setup-sh7710.c | 189
arch/sh/kernel/cpu/sh3/setup-sh7720.c | 286 -
arch/sh/kernel/cpu/sh3/swsusp.S | 144
arch/sh/kernel/cpu/sh4/Makefile | 37
arch/sh/kernel/cpu/sh4/clock-sh4-202.c | 174
arch/sh/kernel/cpu/sh4/clock-sh4.c | 77
arch/sh/kernel/cpu/sh4/fpu.c | 425 --
arch/sh/kernel/cpu/sh4/perf_event.c | 265 -
arch/sh/kernel/cpu/sh4/probe.c | 260 -
arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 139
arch/sh/kernel/cpu/sh4/setup-sh7750.c | 359 -
arch/sh/kernel/cpu/sh4/setup-sh7760.c | 297 -
arch/sh/kernel/cpu/sh4/softfloat.c | 930 ----
arch/sh/kernel/cpu/sh4/sq.c | 414 --
arch/sh/kernel/cpu/sh4a/Makefile | 53
arch/sh/kernel/cpu/sh4a/clock-sh7343.c | 277 -
arch/sh/kernel/cpu/sh4a/clock-sh7366.c | 270 -
arch/sh/kernel/cpu/sh4a/clock-sh7722.c | 253 -
arch/sh/kernel/cpu/sh4a/clock-sh7723.c | 301 -
arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 367 -
arch/sh/kernel/cpu/sh4a/clock-sh7734.c | 256 -
arch/sh/kernel/cpu/sh4a/clock-sh7757.c | 152
arch/sh/kernel/cpu/sh4a/clock-sh7763.c | 116
arch/sh/kernel/cpu/sh4a/clock-sh7770.c | 70
arch/sh/kernel/cpu/sh4a/clock-sh7780.c | 122
arch/sh/kernel/cpu/sh4a/clock-sh7785.c | 174
arch/sh/kernel/cpu/sh4a/clock-sh7786.c | 189
arch/sh/kernel/cpu/sh4a/clock-shx3.c | 148
arch/sh/kernel/cpu/sh4a/intc-shx3.c | 31
arch/sh/kernel/cpu/sh4a/perf_event.c | 299 -
arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c | 21
arch/sh/kernel/cpu/sh4a/pinmux-sh7723.c | 27
arch/sh/kernel/cpu/sh4a/pinmux-sh7724.c | 32
arch/sh/kernel/cpu/sh4a/pinmux-sh7734.c | 32
arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c | 32
arch/sh/kernel/cpu/sh4a/pinmux-sh7785.c | 27
arch/sh/kernel/cpu/sh4a/pinmux-sh7786.c | 32
arch/sh/kernel/cpu/sh4a/pinmux-shx3.c | 26
arch/sh/kernel/cpu/sh4a/serial-sh7722.c | 24
arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 444 --
arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 388 --
arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 666 ---
arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 644 ---
arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 1288 ------
arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 621 ---
arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 1242 ------
arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 455 --
arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 571 ---
arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 505 --
arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 608 ---
arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 841 ----
arch/sh/kernel/cpu/sh4a/setup-shx3.c | 396 --
arch/sh/kernel/cpu/sh4a/smp-shx3.c | 146
arch/sh/kernel/cpu/sh4a/ubc.c | 130
arch/sh/kernel/cpu/shmobile/Makefile | 8
arch/sh/kernel/cpu/shmobile/cpuidle.c | 95
arch/sh/kernel/cpu/shmobile/pm.c | 153
arch/sh/kernel/cpu/shmobile/sleep.S | 402 --
arch/sh/kernel/crash_dump.c | 27
arch/sh/kernel/debugtraps.S | 38
arch/sh/kernel/disassemble.c | 572 ---
arch/sh/kernel/dma-coherent.c | 33
arch/sh/kernel/dumpstack.c | 156
arch/sh/kernel/dwarf.c | 1206 ------
arch/sh/kernel/entry-common.S | 400 --
arch/sh/kernel/ftrace.c | 365 -
arch/sh/kernel/head_32.S | 365 -
arch/sh/kernel/hw_breakpoint.c | 408 --
arch/sh/kernel/idle.c | 57
arch/sh/kernel/io.c | 111
arch/sh/kernel/io_trapped.c | 291 -
arch/sh/kernel/iomap.c | 162
arch/sh/kernel/ioport.c | 41
arch/sh/kernel/irq.c | 249 -
arch/sh/kernel/irq_32.c | 54
arch/sh/kernel/kdebugfs.c | 14
arch/sh/kernel/kgdb.c | 378 -
arch/sh/kernel/kprobes.c | 452 --
arch/sh/kernel/machine_kexec.c | 204 -
arch/sh/kernel/machvec.c | 122
arch/sh/kernel/module.c | 104
arch/sh/kernel/nmi_debug.c | 75
arch/sh/kernel/perf_callchain.c | 32
arch/sh/kernel/perf_event.c | 363 -
arch/sh/kernel/process.c | 77
arch/sh/kernel/process_32.c | 197 -
arch/sh/kernel/ptrace.c | 34
arch/sh/kernel/ptrace_32.c | 487 --
arch/sh/kernel/reboot.c | 96
arch/sh/kernel/relocate_kernel.S | 230 -
arch/sh/kernel/return_address.c | 56
arch/sh/kernel/setup.c | 356 -
arch/sh/kernel/sh_bios.c | 169
arch/sh/kernel/sh_ksyms_32.c | 118
arch/sh/kernel/signal_32.c | 507 --
arch/sh/kernel/smp.c | 471 --
arch/sh/kernel/stacktrace.c | 79
arch/sh/kernel/swsusp.c | 35
arch/sh/kernel/sys_sh.c | 96
arch/sh/kernel/sys_sh32.c | 61
arch/sh/kernel/syscalls/Makefile | 32
arch/sh/kernel/syscalls/syscall.tbl | 455 --
arch/sh/kernel/syscalls_32.S | 17
arch/sh/kernel/time.c | 45
arch/sh/kernel/topology.c | 74
arch/sh/kernel/traps.c | 204 -
arch/sh/kernel/traps_32.c | 795 ----
arch/sh/kernel/unwinder.c | 165
arch/sh/kernel/vmlinux.lds.S | 82
arch/sh/kernel/vsyscall/.gitignore | 2
arch/sh/kernel/vsyscall/Makefile | 36
arch/sh/kernel/vsyscall/vsyscall-note.S | 26
arch/sh/kernel/vsyscall/vsyscall-sigreturn.S | 75
arch/sh/kernel/vsyscall/vsyscall-syscall.S | 11
arch/sh/kernel/vsyscall/vsyscall-trapa.S | 40
arch/sh/kernel/vsyscall/vsyscall.c | 93
arch/sh/kernel/vsyscall/vsyscall.lds.S | 85
arch/sh/lib/Makefile | 32
arch/sh/lib/__clear_user.S | 109
arch/sh/lib/ashiftrt.S | 128
arch/sh/lib/ashldi3.c | 30
arch/sh/lib/ashlsi3.S | 189
arch/sh/lib/ashrdi3.c | 32
arch/sh/lib/ashrsi3.S | 179
arch/sh/lib/checksum.S | 365 -
arch/sh/lib/copy_page.S | 390 --
arch/sh/lib/delay.c | 54
arch/sh/lib/div64-generic.c | 20
arch/sh/lib/div64.S | 47
arch/sh/lib/io.c | 79
arch/sh/lib/libgcc.h | 27
arch/sh/lib/lshrdi3.c | 30
arch/sh/lib/lshrsi3.S | 188
arch/sh/lib/mcount.S | 287 -
arch/sh/lib/memchr.S | 27
arch/sh/lib/memcpy-sh4.S | 800 ----
arch/sh/lib/memcpy.S | 228 -
arch/sh/lib/memmove.S | 255 -
arch/sh/lib/memset-sh4.S | 108
arch/sh/lib/memset.S | 59
arch/sh/lib/movmem.S | 217 -
arch/sh/lib/strlen.S | 71
arch/sh/lib/udiv_qrnnd.S | 60
arch/sh/lib/udivsi3.S | 66
arch/sh/lib/udivsi3_i4i-Os.S | 128
arch/sh/lib/udivsi3_i4i.S | 645 ---
arch/sh/math-emu/Makefile | 2
arch/sh/math-emu/math.c | 506 --
arch/sh/math-emu/sfp-util.h | 73
arch/sh/mm/Kconfig | 254 -
arch/sh/mm/Makefile | 45
arch/sh/mm/alignment.c | 189
arch/sh/mm/asids-debugfs.c | 59
arch/sh/mm/cache-debugfs.c | 109
arch/sh/mm/cache-j2.c | 64
arch/sh/mm/cache-sh2.c | 90
arch/sh/mm/cache-sh2a.c | 188
arch/sh/mm/cache-sh3.c | 102
arch/sh/mm/cache-sh4.c | 390 --
arch/sh/mm/cache-sh7705.c | 194 -
arch/sh/mm/cache-shx3.c | 44
arch/sh/mm/cache.c | 360 -
arch/sh/mm/consistent.c | 65
arch/sh/mm/extable_32.c | 24
arch/sh/mm/fault.c | 504 --
arch/sh/mm/flush-sh4.c | 111
arch/sh/mm/hugetlbpage.c | 82
arch/sh/mm/init.c | 424 --
arch/sh/mm/ioremap.c | 192 -
arch/sh/mm/ioremap.h | 23
arch/sh/mm/ioremap_fixed.c | 135
arch/sh/mm/kmap.c | 65
arch/sh/mm/mmap.c | 184
arch/sh/mm/nommu.c | 98
arch/sh/mm/numa.c | 56
arch/sh/mm/pgtable.c | 57
arch/sh/mm/pmb.c | 887 ----
arch/sh/mm/sram.c | 35
arch/sh/mm/tlb-debugfs.c | 160
arch/sh/mm/tlb-pteaex.c | 106
arch/sh/mm/tlb-sh3.c | 95
arch/sh/mm/tlb-sh4.c | 108
arch/sh/mm/tlb-urb.c | 93
arch/sh/mm/tlbex_32.c | 82
arch/sh/mm/tlbflush_32.c | 137
arch/sh/mm/uncached.c | 44
arch/sh/tools/Makefile | 16
arch/sh/tools/gen-mach-types | 48
arch/sh/tools/mach-types | 67
b/Documentation/arch.rst | 1
b/Documentation/watchdog/watchdog-parameters.rst | 12
b/MAINTAINERS | 10
b/drivers/Makefile | 1
b/drivers/base/platform.c | 4
b/drivers/clocksource/sh_cmt.c | 16
b/drivers/clocksource/sh_mtu2.c | 16
b/drivers/clocksource/sh_tmu.c | 17
b/drivers/cpufreq/Kconfig | 14
b/drivers/cpufreq/Makefile | 1
b/drivers/dma/sh/Kconfig | 20
b/drivers/dma/sh/Makefile | 13
b/drivers/gpu/drm/Kconfig | 2
b/drivers/gpu/drm/Makefile | 1
b/drivers/i2c/busses/Kconfig | 13
b/drivers/i2c/busses/Makefile | 1
b/drivers/input/keyboard/Kconfig | 10
b/drivers/input/keyboard/Makefile | 1
b/drivers/media/platform/renesas/Kconfig | 11
b/drivers/media/platform/renesas/Makefile | 1
b/drivers/mmc/host/Kconfig | 6
b/drivers/mmc/host/sh_mmcif.c | 21
b/drivers/mtd/nand/raw/Kconfig | 8
b/drivers/mtd/nand/raw/Makefile | 1
b/drivers/net/ethernet/8390/Kconfig | 14
b/drivers/net/ethernet/8390/Makefile | 1
b/drivers/net/ethernet/renesas/Kconfig | 2
b/drivers/net/ethernet/smsc/Kconfig | 4
b/drivers/pinctrl/renesas/Kconfig | 63
b/drivers/pinctrl/renesas/Makefile | 27
b/drivers/pinctrl/renesas/core.c | 598 ---
b/drivers/rtc/Kconfig | 4
b/drivers/rtc/rtc-sh.c | 18
b/drivers/spi/Kconfig | 24
b/drivers/spi/Makefile | 3
b/drivers/tty/serial/Kconfig | 3
b/drivers/tty/serial/sh-sci.c | 57
b/drivers/tty/vt/keyboard.c | 2
b/drivers/usb/host/Kconfig | 18
b/drivers/usb/host/ehci-hcd.c | 7
b/drivers/usb/renesas_usbhs/Kconfig | 2
b/drivers/video/console/Kconfig | 2
b/drivers/video/fbdev/Kconfig | 17
b/drivers/video/fbdev/Makefile | 1
b/drivers/video/logo/Kconfig | 15
b/drivers/video/logo/Makefile | 3
b/drivers/video/logo/logo.c | 12
b/drivers/watchdog/Kconfig | 20
b/drivers/watchdog/Makefile | 3
b/fs/Kconfig.binfmt | 2
b/fs/minix/Kconfig | 2
b/include/linux/cpuhotplug.h | 1
b/include/linux/platform_device.h | 15
b/include/linux/sh_intc.h | 4
b/include/linux/shdma-base.h | 4
b/init/Kconfig | 2
b/kernel/sysctl.c | 3
b/lib/Kconfig.debug | 2
b/lib/math/div64.c | 4
b/lib/test_user_copy.c | 3
b/scripts/coccinelle/misc/cond_no_effect.cocci | 13
b/scripts/head-object-list.txt | 1
b/sound/Kconfig | 2
b/sound/Makefile | 2
b/sound/soc/sh/Kconfig | 48
b/sound/soc/sh/Makefile | 16
b/sound/soc/sh/fsi.c | 9
b/tools/include/asm/barrier.h | 2
b/tools/perf/util/dwarf-regs.c | 1
drivers/cpufreq/sh-cpufreq.c | 175
drivers/dma/sh/shdma-base.c | 1052 -----
drivers/dma/sh/shdma.h | 61
drivers/dma/sh/shdmac.c | 938 ----
drivers/gpu/drm/shmobile/Kconfig | 12
drivers/gpu/drm/shmobile/Makefile | 8
drivers/gpu/drm/shmobile/shmob_drm_backlight.c | 82
drivers/gpu/drm/shmobile/shmob_drm_backlight.h | 19
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 683 ---
drivers/gpu/drm/shmobile/shmob_drm_crtc.h | 55
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 303 -
drivers/gpu/drm/shmobile/shmob_drm_drv.h | 42
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 150
drivers/gpu/drm/shmobile/shmob_drm_kms.h | 29
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 261 -
drivers/gpu/drm/shmobile/shmob_drm_plane.h | 19
drivers/gpu/drm/shmobile/shmob_drm_regs.h | 310 -
drivers/i2c/busses/i2c-sh7760.c | 565 --
drivers/input/keyboard/sh_keysc.c | 334 -
drivers/media/platform/renesas/sh_vou.c | 1375 -------
drivers/mtd/nand/raw/sh_flctl.c | 1234 ------
drivers/net/ethernet/8390/stnic.c | 302 -
drivers/pinctrl/renesas/pfc-sh7203.c | 1577 --------
drivers/pinctrl/renesas/pfc-sh7264.c | 2131 -----------
drivers/pinctrl/renesas/pfc-sh7269.c | 2851 ---------------
drivers/pinctrl/renesas/pfc-sh7720.c | 1201 ------
drivers/pinctrl/renesas/pfc-sh7722.c | 1703 --------
drivers/pinctrl/renesas/pfc-sh7723.c | 1902 ----------
drivers/pinctrl/renesas/pfc-sh7724.c | 2177 -----------
drivers/pinctrl/renesas/pfc-sh7734.c | 2408 ------------
drivers/pinctrl/renesas/pfc-sh7757.c | 2219 -----------
drivers/pinctrl/renesas/pfc-sh7785.c | 1258 ------
drivers/pinctrl/renesas/pfc-sh7786.c | 809 ----
drivers/pinctrl/renesas/pfc-shx3.c | 557 --
drivers/sh/Kconfig | 6
drivers/sh/Makefile | 12
drivers/sh/clk/Makefile | 4
drivers/sh/clk/core.c | 624 ---
drivers/sh/clk/cpg.c | 477 --
drivers/sh/intc/Kconfig | 44
drivers/sh/intc/Makefile | 6
drivers/sh/intc/access.c | 246 -
drivers/sh/intc/balancing.c | 97
drivers/sh/intc/chip.c | 211 -
drivers/sh/intc/core.c | 501 --
drivers/sh/intc/handle.c | 306 -
drivers/sh/intc/internals.h | 191 -
drivers/sh/intc/irqdomain.c | 68
drivers/sh/intc/userimask.c | 84
drivers/sh/intc/virq-debugfs.c | 54
drivers/sh/intc/virq.c | 269 -
drivers/sh/maple/Makefile | 4
drivers/sh/maple/maple.c | 895 ----
drivers/sh/pm_runtime.c | 40
drivers/sh/superhyway/Makefile | 8
drivers/sh/superhyway/superhyway-sysfs.c | 54
drivers/sh/superhyway/superhyway.c | 234 -
drivers/spi/spi-jcore.c | 235 -
drivers/spi/spi-sh-sci.c | 197 -
drivers/spi/spi-sh.c | 474 --
drivers/usb/host/ehci-sh.c | 182
drivers/video/fbdev/sh7760fb.c | 587 ---
drivers/video/logo/logo_superh_clut224.ppm | 1604 --------
drivers/video/logo/logo_superh_vga16.ppm | 1604 --------
drivers/watchdog/shwdt.c | 344 -
include/linux/mtd/sh_flctl.h | 180
include/linux/sh_clk.h | 213 -
include/linux/superhyway.h | 107
sound/sh/Kconfig | 32
sound/sh/Makefile | 11
sound/sh/aica.c | 628 ---
sound/sh/aica.h | 68
sound/sh/sh_dac_audio.c | 412 --
sound/soc/sh/dma-sh7760.c | 334 -
sound/soc/sh/hac.c | 345 -
sound/soc/sh/migor.c | 205 -
sound/soc/sh/sh7760-ac97.c | 72
sound/soc/sh/siu.h | 180
sound/soc/sh/siu_dai.c | 799 ----
sound/soc/sh/siu_pcm.c | 553 --
sound/soc/sh/ssi.c | 403 --
896 files changed, 46 insertions(+), 138518 deletions(-)
^ permalink raw reply
* [PATCH 02/22] usb: remove the dead USB_OHCI_SH option
From: Christoph Hellwig @ 2023-01-13 6:23 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, Arnd Bergmann, Greg Kroah-Hartman
Cc: Laurent Pinchart, Kieran Bingham, Geert Uytterhoeven,
linux-kernel, linux-watchdog, devicetree, linux-arch, dmaengine,
dri-devel, linux-renesas-soc, linux-i2c, linux-input, linux-media,
linux-mmc, linux-mtd, netdev, linux-gpio, linux-rtc, linux-spi,
linux-serial, linux-usb, linux-fbdev, alsa-devel, linux-sh
In-Reply-To: <20230113062339.1909087-1-hch@lst.de>
USB_OHCI_SH is a dummy option that never builds any code, remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/usb/host/Kconfig | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 8d799d23c476e1..ca5f657c092cf4 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -548,17 +548,6 @@ config USB_OHCI_HCD_SSB
If unsure, say N.
-config USB_OHCI_SH
- bool "OHCI support for SuperH USB controller (DEPRECATED)"
- depends on SUPERH || COMPILE_TEST
- select USB_OHCI_HCD_PLATFORM
- help
- This option is deprecated now and the driver was removed, use
- USB_OHCI_HCD_PLATFORM instead.
-
- Enables support for the on-chip OHCI controller on the SuperH.
- If you use the PCI OHCI controller, this option is not necessary.
-
config USB_OHCI_EXYNOS
tristate "OHCI support for Samsung S5P/Exynos SoC Series"
depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
--
2.39.0
^ permalink raw reply related
* Re: [PATCH v6 09/13] HID: i2c-hid: acpi: Stop setting wakeup_capable
From: Werner Sembach @ 2023-01-12 19:57 UTC (permalink / raw)
To: Raul E Rangel, linux-acpi, linux-input
Cc: andriy.shevchenko, dmitry.torokhov, hdegoede, rafael,
mika.westerberg, mario.limonciello, timvp, linus.walleij,
jingle.wu, Benjamin Tissoires, Alistair Francis, Jiri Kosina,
Rob Herring, linux-kernel
In-Reply-To: <20220929093200.v6.9.I2efb7f551e0aa2dc4c53b5fd5bbea91a1cdd9b32@changeid>
Hi,
Am 29.09.22 um 18:19 schrieb Raul E Rangel:
> This is now handled by the i2c-core drive >
> Signed-off-by: Raul E Rangel <rrangel@chromium.org>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>
> (no changes since v5)
>
> Changes in v5:
> - Added Acked-by: Benjamin Tissoires
>
> drivers/hid/i2c-hid/i2c-hid-acpi.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c
> index b96ae15e0ad917e..375c77c3db74d92 100644
> --- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
> +++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
> @@ -105,11 +105,6 @@ static int i2c_hid_acpi_probe(struct i2c_client *client)
>
> acpi_device_fix_up_power(adev);
>
> - if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
> - device_set_wakeup_capable(dev, true);
> - device_set_wakeup_enable(dev, false);
> - }
> -
> return i2c_hid_core_probe(client, &ihid_acpi->ops,
> hid_descriptor_address, 0);
> }
this patch is causing a regression on the Clevo NL50RU of which the touchpad
instantly wakes up the device when going to sleep. That wasn't triggered until
this patch by the default settings: Setting wake capable but not enabling it by
default. So unless a user enabled it by hand, the device went correctly to sleep.
I'm not deep into this subsystem so I don't know what the best approach is to
?work around this firmware bug?/?fix this issue?:
- Changing the default back again?
- Adding a quirk list for bad devices?
- Maybe this isn't a firmware bug, but the touchpad was not meant to wakeup the
device and we can somehow detect that?
For reference: The debugging issue that lead me here:
https://gitlab.freedesktop.org/drm/amd/-/issues/1722#note_1719789
Kind regards,
Werner
^ permalink raw reply
* Re: [PATCH v6 09/13] HID: i2c-hid: acpi: Stop setting wakeup_capable
From: Limonciello, Mario @ 2023-01-12 20:09 UTC (permalink / raw)
To: Werner Sembach, Raul E Rangel, linux-acpi, linux-input
Cc: andriy.shevchenko, dmitry.torokhov, hdegoede, rafael,
mika.westerberg, timvp, linus.walleij, jingle.wu,
Benjamin Tissoires, Alistair Francis, Jiri Kosina, Rob Herring,
linux-kernel
In-Reply-To: <5824c823-dced-bdff-dbd1-5cec9e89480f@tuxedocomputers.com>
On 1/12/2023 13:57, Werner Sembach wrote:
> Hi,
>
> Am 29.09.22 um 18:19 schrieb Raul E Rangel:
>> This is now handled by the i2c-core drive >
>> Signed-off-by: Raul E Rangel <rrangel@chromium.org>
>> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>> ---
>>
>> (no changes since v5)
>>
>> Changes in v5:
>> - Added Acked-by: Benjamin Tissoires
>>
>> drivers/hid/i2c-hid/i2c-hid-acpi.c | 5 -----
>> 1 file changed, 5 deletions(-)
>>
>> diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c
>> b/drivers/hid/i2c-hid/i2c-hid-acpi.c
>> index b96ae15e0ad917e..375c77c3db74d92 100644
>> --- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
>> +++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
>> @@ -105,11 +105,6 @@ static int i2c_hid_acpi_probe(struct i2c_client
>> *client)
>> acpi_device_fix_up_power(adev);
>> - if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
>> - device_set_wakeup_capable(dev, true);
>> - device_set_wakeup_enable(dev, false);
>> - }
>> -
>> return i2c_hid_core_probe(client, &ihid_acpi->ops,
>> hid_descriptor_address, 0);
>> }
>
> this patch is causing a regression on the Clevo NL50RU of which the
> touchpad instantly wakes up the device when going to sleep. That wasn't
> triggered until this patch by the default settings: Setting wake capable
> but not enabling it by default. So unless a user enabled it by hand, the
> device went correctly to sleep.
>
> I'm not deep into this subsystem so I don't know what the best approach
> is to ?work around this firmware bug?/?fix this issue?:
> - Changing the default back again?
> - Adding a quirk list for bad devices?
> - Maybe this isn't a firmware bug, but the touchpad was not meant to
> wakeup the device and we can somehow detect that?
>
"Generally" laptops that support modern standby/s2idle can be woken from
the touchpad.
By chance can you check Windows? Wait a few minutes after you put it to
sleep to ensure it's really gotten down to a hardware sleep state.
> For reference: The debugging issue that lead me here:
> https://gitlab.freedesktop.org/drm/amd/-/issues/1722#note_1719789
TLDR - That bug has multiple conflated issues, and you can ignore 95% of
it. It's just the last few comments we concluded and bisected down this
regression.
^ permalink raw reply
* Re: (subset) [PATCH v2 00/27] ARM: pxa: remove all unused boards&drivers
From: Mark Brown @ 2023-01-12 20:01 UTC (permalink / raw)
To: Robert Jarzmik, Arnd Bergmann
Cc: Daniel Mack, Haojian Zhuang, linux-arm-kernel, linux-kernel,
Arnd Bergmann, stern, alexandre.belloni, brgl, damien.lemoal,
dmitry.torokhov, linux, balbi, gregkh, deller, perex, jingoohan1,
lee, kernel, lgirdwood, linus.walleij, marek.vasut, mkpetch,
miquel.raynal, lost.distance, philipp.zabel, linux, sre, slapin,
s.shtylyov, sudipm.mukherjee, tiwai, ulf.hansson, vigneshr,
viresh.kumar, wsa+renesas, linux-pm, linux-ide, linux-gpio,
linux-input, patches, linux-leds, linux-mmc, linux-renesas-soc,
linux-mtd, linux-rtc, linux-usb, dri-devel, linux-fbdev,
alsa-devel
In-Reply-To: <20230105134622.254560-1-arnd@kernel.org>
On Thu, 05 Jan 2023 14:45:55 +0100, Arnd Bergmann wrote:
> Most of the legacy PXA board files were marked as unused in linux-5.19 and
> can get removed in linux-6.3. There is support for pxa250/pxa270/pxa300
> using devicetree already, which supports a number of boards, but progress
> on converting the remaining ones has stalled over the past few years.
>
> The two boards that are left in the tree for now are the three 'sharpsl'
> variants (spitz/akita/borzoi) and the 'gumstix' family of machines.
> Both of these are supported by qemu, which can be helpful for completing
> the DT conversion.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[14/27] ASoC: PXA: make SND_PXA2XX_SOC_AC97 user-selectable
commit: 5eab9265759e2fb042aa452931c3d06ab7ab8dae
[15/27] ASoC: pxa: remove unused board support
(no commit info)
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* [PATCH] HID: amd_sfh: if no sensors are enabled, clean up
From: Mario Limonciello @ 2023-01-12 19:01 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina
Cc: Mario Limonciello, Xaver Hugl, Jiri Kosina, Benjamin Tissoires,
linux-input, linux-kernel
It was reported that commit b300667b33b2 ("HID: amd_sfh: Disable the
interrupt for all command") had caused increased resume time on HP Envy
x360.
Before this commit 3 sensors were reported, but they were not actually
functional. After this commit the sensors are no longer reported, but
also the resume time increased.
To avoid this problem explicitly look for the number of disabled sensors.
If all the sensors are disabled, clean everything up.
Fixes: b300667b33b2 ("HID: amd_sfh: Disable the interrupt for all command")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2115
Reported-by: Xaver Hugl <xaver.hugl@gmail.com>
Tested-by: Xaver Hugl <xaver.hugl@gmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/hid/amd-sfh-hid/amd_sfh_client.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c
index ab125f79408f2..7469691b4a633 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c
@@ -227,6 +227,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
cl_data->num_hid_devices = amd_mp2_get_sensor_num(privdata, &cl_data->sensor_idx[0]);
if (cl_data->num_hid_devices == 0)
return -ENODEV;
+ cl_data->hid_dev_count = cl_data->num_hid_devices;
INIT_DELAYED_WORK(&cl_data->work, amd_sfh_work);
INIT_DELAYED_WORK(&cl_data->work_buffer, amd_sfh_work_buffer);
@@ -301,12 +302,18 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
cl_data->sensor_sts[i]);
goto cleanup;
}
+ } else {
+ mp2_ops->stop(privdata, cl_data->sensor_idx[i]);
+ status = amd_sfh_wait_for_response
+ (privdata, cl_data->sensor_idx[i], SENSOR_DISABLED);
+ cl_data->hid_dev_count--;
}
dev_dbg(dev, "sid 0x%x (%s) status 0x%x\n",
cl_data->sensor_idx[i], get_sensor_name(cl_data->sensor_idx[i]),
cl_data->sensor_sts[i]);
}
- if (mp2_ops->discovery_status && mp2_ops->discovery_status(privdata) == 0) {
+ if (!cl_data->hid_dev_count ||
+ (mp2_ops->discovery_status && mp2_ops->discovery_status(privdata) == 0)) {
amd_sfh_hid_client_deinit(privdata);
for (i = 0; i < cl_data->num_hid_devices; i++) {
devm_kfree(dev, cl_data->feature_report[i]);
--
2.34.1
^ permalink raw reply related
* Re: [PATCH] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
From: Hans de Goede @ 2023-01-12 16:45 UTC (permalink / raw)
To: Michael Klein, Mark Gross, linux-input, platform-driver-x86,
linux-kernel
In-Reply-To: <20221220121103.uiwn5l7fii2iggct@LLGMVZLB-0037>
Hi,
On 12/20/22 13:11, Michael Klein wrote:
> Add touchscreen info for the CSL Panther Tab HD.
>
> Signed-off-by: Michael Klein <m.klein@mvz-labor-lb.de>
Thank you for your patch, I've applied this patch to my fixes
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes
Note it will show up in my fixes branch once I've pushed my
local branch there, which might take a while.
I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.
Regards,
Hans
> ---
> drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
> index baae3120efd0..f00995390fdf 100644
> --- a/drivers/platform/x86/touchscreen_dmi.c
> +++ b/drivers/platform/x86/touchscreen_dmi.c
> @@ -264,6 +264,23 @@ static const struct ts_dmi_data connect_tablet9_data = {
> .properties = connect_tablet9_props,
> };
>
> +static const struct property_entry csl_panther_tab_hd_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
> + PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
> + PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
> + PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-csl-panther-tab-hd.fw"),
> + PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> + { }
> +};
> +
> +static const struct ts_dmi_data csl_panther_tab_hd_data = {
> + .acpi_name = "MSSL1680:00",
> + .properties = csl_panther_tab_hd_props,
> +};
> +
> static const struct property_entry cube_iwork8_air_props[] = {
> PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
> PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
> @@ -1124,6 +1141,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
> DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
> },
> },
> + {
> + /* CSL Panther Tab HD */
> + .driver_data = (void *)&csl_panther_tab_hd_data,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "CSL Computer GmbH & Co. KG"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"),
> + },
> + },
> {
> /* CUBE iwork8 Air */
> .driver_data = (void *)&cube_iwork8_air_data,
^ permalink raw reply
* Re: [PATCH v2 05/16] driver core: make struct device_type.uevent() take a const *
From: Heikki Krogerus @ 2023-01-12 11:58 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jens Axboe, Len Brown, Stefan Richter, Wolfram Sang,
Alexandre Belloni, Dmitry Torokhov, Sean Young, Rob Herring,
Frank Rowand, Maximilian Luz, Hans de Goede, Mark Gross,
Vinod Koul, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
Andreas Noever, Michael Jamet, Yehezkel Bernat, Jiri Slaby,
Matthew Wilcox (Oracle), Martin K. Petersen, Chaitanya Kulkarni,
Ming Lei, Jilin Yuan, Alan Stern, Andy Shevchenko, Sakari Ailus,
Jason Gunthorpe, Thomas Gleixner, Ira Weiny, Dan Williams,
Won Chung, alsa-devel, devicetree, linux-acpi, linux-block,
linux-i2c, linux-i3c, linux-input, linux-media, linux-serial,
linux-usb, linux1394-devel, platform-driver-x86,
Rafael J . Wysocki, Mika Westerberg, Mauro Carvalho Chehab
In-Reply-To: <20230111113018.459199-6-gregkh@linuxfoundation.org>
On Wed, Jan 11, 2023 at 12:30:07PM +0100, Greg Kroah-Hartman wrote:
> The uevent() callback in struct device_type should not be modifying the
> device that is passed into it, so mark it as a const * and propagate the
> function signature changes out into all relevant subsystems that use
> this callback.
>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
> Cc: Wolfram Sang <wsa@kernel.org>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Sean Young <sean@mess.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: Maximilian Luz <luzmaximilian@gmail.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Cc: Sanyog Kale <sanyog.r.kale@intel.com>
> Cc: Andreas Noever <andreas.noever@gmail.com>
> Cc: Michael Jamet <michael.jamet@intel.com>
> Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Chaitanya Kulkarni <kch@nvidia.com>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Won Chung <wonchung@google.com>
> Cc: alsa-devel@alsa-project.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-acpi@vger.kernel.org
> Cc: linux-block@vger.kernel.org
> Cc: linux-i2c@vger.kernel.org
> Cc: linux-i3c@lists.infradead.org
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-media@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: linux1394-devel@lists.sourceforge.net
> Cc: platform-driver-x86@vger.kernel.org
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt
> Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> block/partitions/core.c | 4 ++--
> drivers/acpi/device_sysfs.c | 8 ++++----
> drivers/acpi/internal.h | 2 +-
> drivers/firewire/core-device.c | 8 ++++----
> drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +-
> drivers/i2c/i2c-core-base.c | 4 ++--
> drivers/i3c/device.c | 2 +-
> drivers/i3c/master.c | 4 ++--
> drivers/input/input.c | 16 ++++++++--------
> drivers/media/rc/rc-main.c | 2 +-
> drivers/platform/surface/aggregator/bus.c | 4 ++--
> drivers/soundwire/bus_type.c | 4 ++--
> drivers/thunderbolt/switch.c | 4 ++--
> drivers/thunderbolt/tb.h | 2 +-
> drivers/thunderbolt/xdomain.c | 6 +++---
> drivers/tty/serdev/core.c | 2 +-
> drivers/usb/core/message.c | 8 ++++----
> drivers/usb/core/usb.c | 4 ++--
> drivers/usb/phy/phy.c | 6 +++---
> drivers/usb/roles/class.c | 3 +--
> drivers/usb/typec/class.c | 2 +-
> include/linux/acpi.h | 4 ++--
> include/linux/device.h | 2 +-
> include/linux/i3c/device.h | 2 +-
> include/linux/soundwire/sdw_type.h | 2 +-
> 25 files changed, 53 insertions(+), 54 deletions(-)
>
> diff --git a/block/partitions/core.c b/block/partitions/core.c
> index b8112f52d388..7b8ef6296abd 100644
> --- a/block/partitions/core.c
> +++ b/block/partitions/core.c
> @@ -254,9 +254,9 @@ static void part_release(struct device *dev)
> iput(dev_to_bdev(dev)->bd_inode);
> }
>
> -static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int part_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct block_device *part = dev_to_bdev(dev);
> + const struct block_device *part = dev_to_bdev(dev);
>
> add_uevent_var(env, "PARTN=%u", part->bd_partno);
> if (part->bd_meta_info && part->bd_meta_info->volname[0])
> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
> index 120873dad2cc..daff2c0c5c52 100644
> --- a/drivers/acpi/device_sysfs.c
> +++ b/drivers/acpi/device_sysfs.c
> @@ -133,7 +133,7 @@ static void acpi_hide_nondev_subnodes(struct acpi_device_data *data)
> * -EINVAL: output error
> * -ENOMEM: output is truncated
> */
> -static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
> +static int create_pnp_modalias(const struct acpi_device *acpi_dev, char *modalias,
> int size)
> {
> int len;
> @@ -191,7 +191,7 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
> * only be called for devices having ACPI_DT_NAMESPACE_HID in their list of
> * ACPI/PNP IDs.
> */
> -static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
> +static int create_of_modalias(const struct acpi_device *acpi_dev, char *modalias,
> int size)
> {
> struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER };
> @@ -239,7 +239,7 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
> return len;
> }
>
> -int __acpi_device_uevent_modalias(struct acpi_device *adev,
> +int __acpi_device_uevent_modalias(const struct acpi_device *adev,
> struct kobj_uevent_env *env)
> {
> int len;
> @@ -277,7 +277,7 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
> * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
> * hid:IBM0001 and cid:ACPI0001 you get: "acpi:IBM0001:ACPI0001".
> */
> -int acpi_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)
> +int acpi_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env)
> {
> return __acpi_device_uevent_modalias(acpi_companion_match(dev), env);
> }
> diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
> index ec584442fb29..06ad497067ac 100644
> --- a/drivers/acpi/internal.h
> +++ b/drivers/acpi/internal.h
> @@ -120,7 +120,7 @@ int acpi_bus_register_early_device(int type);
> Device Matching and Notification
> -------------------------------------------------------------------------- */
> struct acpi_device *acpi_companion_match(const struct device *dev);
> -int __acpi_device_uevent_modalias(struct acpi_device *adev,
> +int __acpi_device_uevent_modalias(const struct acpi_device *adev,
> struct kobj_uevent_env *env);
>
> /* --------------------------------------------------------------------------
> diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
> index adddd8c45d0c..aa597cda0d88 100644
> --- a/drivers/firewire/core-device.c
> +++ b/drivers/firewire/core-device.c
> @@ -133,7 +133,7 @@ static void get_ids(const u32 *directory, int *id)
> }
> }
>
> -static void get_modalias_ids(struct fw_unit *unit, int *id)
> +static void get_modalias_ids(const struct fw_unit *unit, int *id)
> {
> get_ids(&fw_parent_device(unit)->config_rom[5], id);
> get_ids(unit->directory, id);
> @@ -195,7 +195,7 @@ static void fw_unit_remove(struct device *dev)
> driver->remove(fw_unit(dev));
> }
>
> -static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
> +static int get_modalias(const struct fw_unit *unit, char *buffer, size_t buffer_size)
> {
> int id[] = {0, 0, 0, 0};
>
> @@ -206,9 +206,9 @@ static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
> id[0], id[1], id[2], id[3]);
> }
>
> -static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int fw_unit_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct fw_unit *unit = fw_unit(dev);
> + const struct fw_unit *unit = fw_unit(dev);
> char modalias[64];
>
> get_modalias(unit, modalias, sizeof(modalias));
> diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> index e31a0261c53e..8a165be1a821 100644
> --- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
> +++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> @@ -161,7 +161,7 @@ static void dp_aux_ep_dev_release(struct device *dev)
> kfree(aux_ep_with_data);
> }
>
> -static int dp_aux_ep_dev_modalias(struct device *dev, struct kobj_uevent_env *env)
> +static int dp_aux_ep_dev_modalias(const struct device *dev, struct kobj_uevent_env *env)
> {
> return of_device_uevent_modalias(dev, env);
> }
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index 087e480b624c..51b78a52ab7f 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -136,9 +136,9 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv)
> return 0;
> }
>
> -static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int i2c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct i2c_client *client = to_i2c_client(dev);
> + const struct i2c_client *client = to_i2c_client(dev);
> int rc;
>
> rc = of_device_uevent_modalias(dev, env);
> diff --git a/drivers/i3c/device.c b/drivers/i3c/device.c
> index d111499061b2..1a6a8703dbc3 100644
> --- a/drivers/i3c/device.c
> +++ b/drivers/i3c/device.c
> @@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(i3c_device_do_setdasa);
> *
> * Retrieve I3C dev info.
> */
> -void i3c_device_get_info(struct i3c_device *dev,
> +void i3c_device_get_info(const struct i3c_device *dev,
> struct i3c_device_info *info)
> {
> if (!info)
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index d7e6f6c99aea..7a60e1c5e587 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -273,9 +273,9 @@ static struct attribute *i3c_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(i3c_device);
>
> -static int i3c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int i3c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct i3c_device *i3cdev = dev_to_i3cdev(dev);
> + const struct i3c_device *i3cdev = dev_to_i3cdev(dev);
> struct i3c_device_info devinfo;
> u16 manuf, part, ext;
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index ca2e3dd7188b..0336e799d713 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -1372,7 +1372,7 @@ INPUT_DEV_STRING_ATTR_SHOW(phys);
> INPUT_DEV_STRING_ATTR_SHOW(uniq);
>
> static int input_print_modalias_bits(char *buf, int size,
> - char name, unsigned long *bm,
> + char name, const unsigned long *bm,
> unsigned int min_bit, unsigned int max_bit)
> {
> int len = 0, i;
> @@ -1384,7 +1384,7 @@ static int input_print_modalias_bits(char *buf, int size,
> return len;
> }
>
> -static int input_print_modalias(char *buf, int size, struct input_dev *id,
> +static int input_print_modalias(char *buf, int size, const struct input_dev *id,
> int add_cr)
> {
> int len;
> @@ -1432,7 +1432,7 @@ static ssize_t input_dev_show_modalias(struct device *dev,
> }
> static DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
>
> -static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
> +static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
> int max, int add_cr);
>
> static ssize_t input_dev_show_properties(struct device *dev,
> @@ -1524,7 +1524,7 @@ static const struct attribute_group input_dev_id_attr_group = {
> .attrs = input_dev_id_attrs,
> };
>
> -static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
> +static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
> int max, int add_cr)
> {
> int i;
> @@ -1621,7 +1621,7 @@ static void input_dev_release(struct device *device)
> * device bitfields.
> */
> static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
> - const char *name, unsigned long *bitmap, int max)
> + const char *name, const unsigned long *bitmap, int max)
> {
> int len;
>
> @@ -1639,7 +1639,7 @@ static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
> }
>
> static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
> - struct input_dev *dev)
> + const struct input_dev *dev)
> {
> int len;
>
> @@ -1677,9 +1677,9 @@ static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
> return err; \
> } while (0)
>
> -static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env)
> +static int input_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
> {
> - struct input_dev *dev = to_input_dev(device);
> + const struct input_dev *dev = to_input_dev(device);
>
> INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x",
> dev->id.bustype, dev->id.vendor,
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index 527d9324742b..6bdad6341844 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -1614,7 +1614,7 @@ static void rc_dev_release(struct device *device)
> kfree(dev);
> }
>
> -static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
> +static int rc_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
> {
> struct rc_dev *dev = to_rc_dev(device);
> int ret = 0;
> diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c
> index de539938896e..407eb55050a6 100644
> --- a/drivers/platform/surface/aggregator/bus.c
> +++ b/drivers/platform/surface/aggregator/bus.c
> @@ -35,9 +35,9 @@ static struct attribute *ssam_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(ssam_device);
>
> -static int ssam_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int ssam_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct ssam_device *sdev = to_ssam_device(dev);
> + const struct ssam_device *sdev = to_ssam_device(dev);
>
> return add_uevent_var(env, "MODALIAS=ssam:d%02Xc%02Xt%02Xi%02Xf%02X",
> sdev->uid.domain, sdev->uid.category,
> diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
> index 04b3529f8929..26c9a0a85d49 100644
> --- a/drivers/soundwire/bus_type.c
> +++ b/drivers/soundwire/bus_type.c
> @@ -58,9 +58,9 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size)
> slave->id.sdw_version, slave->id.class_id);
> }
>
> -int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env)
> +int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct sdw_slave *slave = dev_to_sdw_dev(dev);
> + const struct sdw_slave *slave = dev_to_sdw_dev(dev);
> char modalias[32];
>
> sdw_slave_modalias(slave, modalias, sizeof(modalias));
> diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
> index 363d712aa364..cb6c304c445e 100644
> --- a/drivers/thunderbolt/switch.c
> +++ b/drivers/thunderbolt/switch.c
> @@ -2176,9 +2176,9 @@ static void tb_switch_release(struct device *dev)
> kfree(sw);
> }
>
> -static int tb_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int tb_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct tb_switch *sw = tb_to_switch(dev);
> + const struct tb_switch *sw = tb_to_switch(dev);
> const char *type;
>
> if (sw->config.thunderbolt_version == USB4_VERSION_1_0) {
> diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
> index f9786976f5ec..909da0a98134 100644
> --- a/drivers/thunderbolt/tb.h
> +++ b/drivers/thunderbolt/tb.h
> @@ -815,7 +815,7 @@ static inline bool tb_is_switch(const struct device *dev)
> return dev->type == &tb_switch_type;
> }
>
> -static inline struct tb_switch *tb_to_switch(struct device *dev)
> +static inline struct tb_switch *tb_to_switch(const struct device *dev)
> {
> if (tb_is_switch(dev))
> return container_of(dev, struct tb_switch, dev);
> diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
> index cfa83486c9da..7bf1e360b04c 100644
> --- a/drivers/thunderbolt/xdomain.c
> +++ b/drivers/thunderbolt/xdomain.c
> @@ -881,7 +881,7 @@ static ssize_t key_show(struct device *dev, struct device_attribute *attr,
> }
> static DEVICE_ATTR_RO(key);
>
> -static int get_modalias(struct tb_service *svc, char *buf, size_t size)
> +static int get_modalias(const struct tb_service *svc, char *buf, size_t size)
> {
> return snprintf(buf, size, "tbsvc:k%sp%08Xv%08Xr%08X", svc->key,
> svc->prtcid, svc->prtcvers, svc->prtcrevs);
> @@ -953,9 +953,9 @@ static const struct attribute_group *tb_service_attr_groups[] = {
> NULL,
> };
>
> -static int tb_service_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int tb_service_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct tb_service *svc = container_of(dev, struct tb_service, dev);
> + const struct tb_service *svc = container_of_const(dev, struct tb_service, dev);
> char modalias[64];
>
> get_modalias(svc, modalias, sizeof(modalias));
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index 0180e1e4e75d..aa80de3a8194 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -42,7 +42,7 @@ static struct attribute *serdev_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(serdev_device);
>
> -static int serdev_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int serdev_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> int rc;
>
> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
> index 127fac1af676..cc404bb7e8f7 100644
> --- a/drivers/usb/core/message.c
> +++ b/drivers/usb/core/message.c
> @@ -1819,11 +1819,11 @@ void usb_authorize_interface(struct usb_interface *intf)
> }
> }
>
> -static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_if_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct usb_device *usb_dev;
> - struct usb_interface *intf;
> - struct usb_host_interface *alt;
> + const struct usb_device *usb_dev;
> + const struct usb_interface *intf;
> + const struct usb_host_interface *alt;
>
> intf = to_usb_interface(dev);
> usb_dev = interface_to_usbdev(intf);
> diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
> index 11b15d7b357a..8527c06b65e6 100644
> --- a/drivers/usb/core/usb.c
> +++ b/drivers/usb/core/usb.c
> @@ -423,9 +423,9 @@ static void usb_release_dev(struct device *dev)
> kfree(udev);
> }
>
> -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct usb_device *usb_dev;
> + const struct usb_device *usb_dev;
>
> usb_dev = to_usb_device(dev);
>
> diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
> index 1b24492bb4e5..4b468bde19cf 100644
> --- a/drivers/usb/phy/phy.c
> +++ b/drivers/usb/phy/phy.c
> @@ -80,7 +80,7 @@ static struct usb_phy *__of_usb_find_phy(struct device_node *node)
> return ERR_PTR(-EPROBE_DEFER);
> }
>
> -static struct usb_phy *__device_to_usb_phy(struct device *dev)
> +static struct usb_phy *__device_to_usb_phy(const struct device *dev)
> {
> struct usb_phy *usb_phy;
>
> @@ -145,9 +145,9 @@ static void usb_phy_notify_charger_work(struct work_struct *work)
> kobject_uevent(&usb_phy->dev->kobj, KOBJ_CHANGE);
> }
>
> -static int usb_phy_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_phy_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct usb_phy *usb_phy;
> + const struct usb_phy *usb_phy;
> char uchger_state[50] = { 0 };
> char uchger_type[50] = { 0 };
> unsigned long flags;
> diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
> index eacb46ec2ab3..56814ef80c24 100644
> --- a/drivers/usb/roles/class.c
> +++ b/drivers/usb/roles/class.c
> @@ -274,8 +274,7 @@ static const struct attribute_group *usb_role_switch_groups[] = {
> NULL,
> };
>
> -static int
> -usb_role_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_role_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> int ret;
>
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 5897905cb4f0..a89d8fd3f46c 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1737,7 +1737,7 @@ static const struct attribute_group *typec_groups[] = {
> NULL
> };
>
> -static int typec_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int typec_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> int ret;
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 5e6a876e17ba..564b62f13bd0 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -723,7 +723,7 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
> const void *acpi_device_get_match_data(const struct device *dev);
> extern bool acpi_driver_match_device(struct device *dev,
> const struct device_driver *drv);
> -int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
> +int acpi_device_uevent_modalias(const struct device *, struct kobj_uevent_env *);
> int acpi_device_modalias(struct device *, char *, int);
>
> struct platform_device *acpi_create_platform_device(struct acpi_device *,
> @@ -958,7 +958,7 @@ static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
> return NULL;
> }
>
> -static inline int acpi_device_uevent_modalias(struct device *dev,
> +static inline int acpi_device_uevent_modalias(const struct device *dev,
> struct kobj_uevent_env *env)
> {
> return -ENODEV;
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 44e3acae7b36..dad0614aad96 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -88,7 +88,7 @@ int subsys_virtual_register(struct bus_type *subsys,
> struct device_type {
> const char *name;
> const struct attribute_group **groups;
> - int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
> + int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
> char *(*devnode)(struct device *dev, umode_t *mode,
> kuid_t *uid, kgid_t *gid);
> void (*release)(struct device *dev);
> diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h
> index 68b558929aec..ce115ef08fec 100644
> --- a/include/linux/i3c/device.h
> +++ b/include/linux/i3c/device.h
> @@ -303,7 +303,7 @@ int i3c_device_do_priv_xfers(struct i3c_device *dev,
>
> int i3c_device_do_setdasa(struct i3c_device *dev);
>
> -void i3c_device_get_info(struct i3c_device *dev, struct i3c_device_info *info);
> +void i3c_device_get_info(const struct i3c_device *dev, struct i3c_device_info *info);
>
> struct i3c_ibi_payload {
> unsigned int len;
> diff --git a/include/linux/soundwire/sdw_type.h b/include/linux/soundwire/sdw_type.h
> index 52eb66cd11bc..d8c27f1e5559 100644
> --- a/include/linux/soundwire/sdw_type.h
> +++ b/include/linux/soundwire/sdw_type.h
> @@ -21,7 +21,7 @@ static inline int is_sdw_slave(const struct device *dev)
> int __sdw_register_driver(struct sdw_driver *drv, struct module *owner);
> void sdw_unregister_driver(struct sdw_driver *drv);
>
> -int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env);
> +int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env);
>
> /**
> * module_sdw_driver() - Helper macro for registering a Soundwire driver
> --
> 2.39.0
--
heikki
^ permalink raw reply
* Silikonmischungen
From: Zbynek Spacek @ 2023-01-12 8:31 UTC (permalink / raw)
To: linux-input
Good morning,
do you need intermediates for processing, plastics (e.g. rubber) or silicone mixtures?
We provide a wide range of silicone rubbers with various properties, silicone mixtures from renowned manufacturers such as Wacker, Elastosil LR and dyes, stabilizers, primers and anti-adhesive additives.
We also produce technical silicone compounds with increased resistance to oils, resistant to high temperatures and water vapor, conductive and many more.
We provide fast order fulfillment, timely deliveries and cost optimization.
Can I introduce what we can offer you?
Best regards
Zbynek Spacek
^ permalink raw reply
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
From: qi feng @ 2023-01-12 2:46 UTC (permalink / raw)
To: jikos
Cc: rydberg, benjamin.tissoires, linux-input, linux-kernel, fengqi,
lixiaojie5
In-Reply-To: <CACOZ=ZW5vpaPpFsQ64nSE3kinUhGDBeDey7odvnGeZFEKys32g@mail.gmail.com>
please help me review this code
thanks a lot
qi feng <fengqi706@gmail.com> 于2023年1月10日周二 17:53写道:
>
> loop more
>
>
> Qi Feng <fengqi706@gmail.com> 于2023年1月9日周一 20:32写道:
> >
> > From: fengqi <fengqi@xiaomi.com>
> >
> > Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
> > event is non-existent in current HID driver.
> > So we add this event in hid-input.c
> >
> > Signed-off-by: fengqi <fengqi@xiaomi.com>
> > ---
> > drivers/hid/hid-input.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> > index 9b59e436df0a..22cca3406b5c 100644
> > --- a/drivers/hid/hid-input.c
> > +++ b/drivers/hid/hid-input.c
> > @@ -1105,6 +1105,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> > case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
> > case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
> > case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
> > + case 0x0ee: map_key_clear(KEY_CAMERA_FOCUS); break;
> > case 0x0f5: map_key_clear(KEY_SLOW); break;
> >
> > case 0x181: map_key_clear(KEY_BUTTONCONFIG); break;
> > --
> > 2.39.0
> >
^ permalink raw reply
* [PATCH] HID: hid-logitech-hidpp: Add support for Logitech G923 wheel Xbox Edition (Take 2)
From: Walt Holman @ 2023-01-11 20:58 UTC (permalink / raw)
To: linux-kernel, linux-input, Bastien Nocera
Hello,
This patch adds support for the Logitech G923 Xbox edition steering wheel. This uses the hid-logitech-hidpp kernel module and from my testing, force feedback and all buttons work. This requires the usb_modeswitch application to setup the device in PC mode with a magic string that is the same as the Logitech 920 wheel.
Signed-off-by: Walt Holman waltholman09@gmail.com
diff -uprN linux-6.2-rc3-source/drivers/hid/hid-ids.h linux-6.2-rc3-target/drivers/hid/hid-ids.h
--- linux-6.2-rc3-source/drivers/hid/hid-ids.h 2023-01-10 15:03:06.000000000 -0600
+++ linux-6.2-rc3-target/drivers/hid/hid-ids.h 2023-01-11 13:19:39.460052754 -0600
@@ -820,6 +820,7 @@
#define USB_DEVICE_ID_LOGITECH_G510_USB_AUDIO 0xc22e
#define USB_DEVICE_ID_LOGITECH_G29_WHEEL 0xc24f
#define USB_DEVICE_ID_LOGITECH_G920_WHEEL 0xc262
+#define USB_DEVICE_ID_LOGITECH_G923_XBOX_WHEEL 0xc26e
#define USB_DEVICE_ID_LOGITECH_WINGMAN_F3D 0xc283
#define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286
#define USB_DEVICE_ID_LOGITECH_FLIGHT_SYSTEM_G940 0xc287
diff -uprN linux-6.2-rc3-source/drivers/hid/hid-logitech-hidpp.c linux-6.2-rc3-target/drivers/hid/hid-logitech-hidpp.c
--- linux-6.2-rc3-source/drivers/hid/hid-logitech-hidpp.c 2023-01-10 15:03:06.000000000 -0600
+++ linux-6.2-rc3-target/drivers/hid/hid-logitech-hidpp.c 2023-01-11 13:19:39.460052754 -0600
@@ -4347,6 +4347,9 @@ static const struct hid_device_id hidpp_
{ /* Logitech G920 Wheel over USB */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G920_WHEEL),
.driver_data = HIDPP_QUIRK_CLASS_G920 | HIDPP_QUIRK_FORCE_OUTPUT_REPORTS},
+ { /* Logitech G923 Wheel (Xbox version) over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G923_XBOX_WHEEL),
+ .driver_data = HIDPP_QUIRK_CLASS_G920 | HIDPP_QUIRK_FORCE_OUTPUT_REPORTS },
{ /* Logitech G Pro Gaming Mouse over USB */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC088) },
^ permalink raw reply
* Re: [PATCH] HID: hid-logitech-hidpp: Add support for Logitech G923 wheel Xbox Edition
From: Walt Holman @ 2023-01-11 19:27 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-kernel, linux-input
In-Reply-To: <211974789ce308698ce79a38848036dc498f6d5c.camel@hadess.net>
----- On Jan 11, 2023, at 4:28 AM, Bastien Nocera hadess@hadess.net wrote:
> Hey Walt,
>
> On Tue, 2023-01-03 at 09:29 -0600, Walt Holman wrote:
>> Hello,
>>
>> This patch adds support for the Logitech G923 Xbox edition steering
>> wheel. This uses the hid-logitech-hidpp kernel module and from my
>> testing, force feedback and all buttons work. This requires the
>> usb_modeswitch application to setup the device in PC mode with a
>> magic string that is the same as the Logitech 920 wheel. Originally I
>> had massaged a patch I found for this wheel, however, much of it was
>> unnecessary and I culled it back to just adding the ID's. Let me know
>> if you need anything else or have any questions. Thanks,
>>
>> Signed-off-by: Walt Holman walt@holmansrus.com
>>
>
> You'll want to follow:
> https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
> to submit this patch. It definitely shouldn't be an attachment :)
>
> Cheers
I apologize. I'll re-submit it in a new mail. Thanks,
-Walt
^ permalink raw reply
* Re: [PATCH v3] HID: Recognize sensors with application collections
From: srinivas pandruvada @ 2023-01-11 16:59 UTC (permalink / raw)
To: Aditya Garg, Jiri Kosina, jkosina@suse.cz,
benjamin.tissoires@redhat.com, jic23@kernel.org,
linux-input@vger.kernel.org, LKML, linux-iio@vger.kernel.org
Cc: orlandoch.dev@gmail.com, ronald@innovation.ch
In-Reply-To: <9E66CF6F-99A0-4CC5-9FA0-3A9DCFCA0388@live.com>
On Wed, 2023-01-11 at 10:07 +0000, Aditya Garg wrote:
> From: Ronald Tschalär <ronald@innovation.ch>
>
> According to HUTRR39 logical sensor devices may be nested inside
> physical collections or may be specified in multiple top-level
> application collections (see page 59, strategies 1 and 2). However,
> the current code was only recognizing those with physical
> collections.
>
> This issue turned up in the T2 MacBook Pros which define the ALS in
> a top-level application collection.
>
> Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
> Signed-off-by: Aditya Garg <gargaditya08@live.com>
Since there are some hid core change, Jiri needs to check. If Jiri is
fine with hid core changes:
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> V2 :- Add missing signed-off-by
> V3 :- Avoid using language extensions
> drivers/hid/hid-core.c | 3 ++-
> drivers/hid/hid-sensor-hub.c | 6 ++++--
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index bd47628da..8ff08e6c2 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -804,7 +804,8 @@ static void hid_scan_collection(struct hid_parser
> *parser, unsigned type)
> int i;
>
> if (((parser->global.usage_page << 16) == HID_UP_SENSOR) &&
> - type == HID_COLLECTION_PHYSICAL)
> + (type == HID_COLLECTION_PHYSICAL ||
> + type == HID_COLLECTION_APPLICATION))
> hid->group = HID_GROUP_SENSOR_HUB;
>
> if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
> diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-
> hub.c
> index 6abd3e2a9..83237b86c 100644
> --- a/drivers/hid/hid-sensor-hub.c
> +++ b/drivers/hid/hid-sensor-hub.c
> @@ -397,7 +397,8 @@ int sensor_hub_input_get_attribute_info(struct
> hid_sensor_hub_device *hsdev,
> for (i = 0; i < report->maxfield; ++i) {
> field = report->field[i];
> if (field->maxusage) {
> - if (field->physical == usage_id &&
> + if ((field->physical == usage_id ||
> + field->application == usage_id) &&
> (field->logical ==
> attr_usage_id ||
> field->usage[0].hid ==
> attr_usage_id)
> &&
> @@ -506,7 +507,8 @@ static int sensor_hub_raw_event(struct hid_device
> *hdev,
> collection->usage);
>
> callback = sensor_hub_get_callback(hdev,
> - report->field[i]->physical,
> + report->field[i]->physical ? report-
> >field[i]->physical :
> + report-
> >field[i]->application,
> report->field[i]-
> >usage[0].collection_index,
> &hsdev, &priv);
> if (!callback) {
> --
> 2.34.1
>
^ permalink raw reply
* Re: [PATCH v2 05/16] driver core: make struct device_type.uevent() take a const *
From: Alexandre Belloni @ 2023-01-11 13:32 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jens Axboe, Len Brown, Stefan Richter, Wolfram Sang,
Dmitry Torokhov, Sean Young, Rob Herring, Frank Rowand,
Maximilian Luz, Hans de Goede, Mark Gross, Vinod Koul, Bard Liao,
Pierre-Louis Bossart, Sanyog Kale, Andreas Noever, Michael Jamet,
Yehezkel Bernat, Jiri Slaby, Heikki Krogerus,
Matthew Wilcox (Oracle), Martin K. Petersen, Chaitanya Kulkarni,
Ming Lei, Jilin Yuan, Alan Stern, Andy Shevchenko, Sakari Ailus,
Jason Gunthorpe, Thomas Gleixner, Ira Weiny, Dan Williams,
Won Chung, alsa-devel, devicetree, linux-acpi, linux-block,
linux-i2c, linux-i3c, linux-input, linux-media, linux-serial,
linux-usb, linux1394-devel, platform-driver-x86,
Rafael J . Wysocki, Mika Westerberg, Mauro Carvalho Chehab
In-Reply-To: <20230111113018.459199-6-gregkh@linuxfoundation.org>
On 11/01/2023 12:30:07+0100, Greg Kroah-Hartman wrote:
> The uevent() callback in struct device_type should not be modifying the
> device that is passed into it, so mark it as a const * and propagate the
> function signature changes out into all relevant subsystems that use
> this callback.
>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
> Cc: Wolfram Sang <wsa@kernel.org>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Sean Young <sean@mess.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: Maximilian Luz <luzmaximilian@gmail.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Cc: Sanyog Kale <sanyog.r.kale@intel.com>
> Cc: Andreas Noever <andreas.noever@gmail.com>
> Cc: Michael Jamet <michael.jamet@intel.com>
> Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Chaitanya Kulkarni <kch@nvidia.com>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Won Chung <wonchung@google.com>
> Cc: alsa-devel@alsa-project.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-acpi@vger.kernel.org
> Cc: linux-block@vger.kernel.org
> Cc: linux-i2c@vger.kernel.org
> Cc: linux-i3c@lists.infradead.org
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-media@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: linux1394-devel@lists.sourceforge.net
> Cc: platform-driver-x86@vger.kernel.org
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt
> Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> block/partitions/core.c | 4 ++--
> drivers/acpi/device_sysfs.c | 8 ++++----
> drivers/acpi/internal.h | 2 +-
> drivers/firewire/core-device.c | 8 ++++----
> drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +-
> drivers/i2c/i2c-core-base.c | 4 ++--
> drivers/i3c/device.c | 2 +-
> drivers/i3c/master.c | 4 ++--
> drivers/input/input.c | 16 ++++++++--------
> drivers/media/rc/rc-main.c | 2 +-
> drivers/platform/surface/aggregator/bus.c | 4 ++--
> drivers/soundwire/bus_type.c | 4 ++--
> drivers/thunderbolt/switch.c | 4 ++--
> drivers/thunderbolt/tb.h | 2 +-
> drivers/thunderbolt/xdomain.c | 6 +++---
> drivers/tty/serdev/core.c | 2 +-
> drivers/usb/core/message.c | 8 ++++----
> drivers/usb/core/usb.c | 4 ++--
> drivers/usb/phy/phy.c | 6 +++---
> drivers/usb/roles/class.c | 3 +--
> drivers/usb/typec/class.c | 2 +-
> include/linux/acpi.h | 4 ++--
> include/linux/device.h | 2 +-
> include/linux/i3c/device.h | 2 +-
> include/linux/soundwire/sdw_type.h | 2 +-
> 25 files changed, 53 insertions(+), 54 deletions(-)
>
> diff --git a/block/partitions/core.c b/block/partitions/core.c
> index b8112f52d388..7b8ef6296abd 100644
> --- a/block/partitions/core.c
> +++ b/block/partitions/core.c
> @@ -254,9 +254,9 @@ static void part_release(struct device *dev)
> iput(dev_to_bdev(dev)->bd_inode);
> }
>
> -static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int part_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct block_device *part = dev_to_bdev(dev);
> + const struct block_device *part = dev_to_bdev(dev);
>
> add_uevent_var(env, "PARTN=%u", part->bd_partno);
> if (part->bd_meta_info && part->bd_meta_info->volname[0])
> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
> index 120873dad2cc..daff2c0c5c52 100644
> --- a/drivers/acpi/device_sysfs.c
> +++ b/drivers/acpi/device_sysfs.c
> @@ -133,7 +133,7 @@ static void acpi_hide_nondev_subnodes(struct acpi_device_data *data)
> * -EINVAL: output error
> * -ENOMEM: output is truncated
> */
> -static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
> +static int create_pnp_modalias(const struct acpi_device *acpi_dev, char *modalias,
> int size)
> {
> int len;
> @@ -191,7 +191,7 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
> * only be called for devices having ACPI_DT_NAMESPACE_HID in their list of
> * ACPI/PNP IDs.
> */
> -static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
> +static int create_of_modalias(const struct acpi_device *acpi_dev, char *modalias,
> int size)
> {
> struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER };
> @@ -239,7 +239,7 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
> return len;
> }
>
> -int __acpi_device_uevent_modalias(struct acpi_device *adev,
> +int __acpi_device_uevent_modalias(const struct acpi_device *adev,
> struct kobj_uevent_env *env)
> {
> int len;
> @@ -277,7 +277,7 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
> * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
> * hid:IBM0001 and cid:ACPI0001 you get: "acpi:IBM0001:ACPI0001".
> */
> -int acpi_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)
> +int acpi_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env)
> {
> return __acpi_device_uevent_modalias(acpi_companion_match(dev), env);
> }
> diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
> index ec584442fb29..06ad497067ac 100644
> --- a/drivers/acpi/internal.h
> +++ b/drivers/acpi/internal.h
> @@ -120,7 +120,7 @@ int acpi_bus_register_early_device(int type);
> Device Matching and Notification
> -------------------------------------------------------------------------- */
> struct acpi_device *acpi_companion_match(const struct device *dev);
> -int __acpi_device_uevent_modalias(struct acpi_device *adev,
> +int __acpi_device_uevent_modalias(const struct acpi_device *adev,
> struct kobj_uevent_env *env);
>
> /* --------------------------------------------------------------------------
> diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
> index adddd8c45d0c..aa597cda0d88 100644
> --- a/drivers/firewire/core-device.c
> +++ b/drivers/firewire/core-device.c
> @@ -133,7 +133,7 @@ static void get_ids(const u32 *directory, int *id)
> }
> }
>
> -static void get_modalias_ids(struct fw_unit *unit, int *id)
> +static void get_modalias_ids(const struct fw_unit *unit, int *id)
> {
> get_ids(&fw_parent_device(unit)->config_rom[5], id);
> get_ids(unit->directory, id);
> @@ -195,7 +195,7 @@ static void fw_unit_remove(struct device *dev)
> driver->remove(fw_unit(dev));
> }
>
> -static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
> +static int get_modalias(const struct fw_unit *unit, char *buffer, size_t buffer_size)
> {
> int id[] = {0, 0, 0, 0};
>
> @@ -206,9 +206,9 @@ static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
> id[0], id[1], id[2], id[3]);
> }
>
> -static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int fw_unit_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct fw_unit *unit = fw_unit(dev);
> + const struct fw_unit *unit = fw_unit(dev);
> char modalias[64];
>
> get_modalias(unit, modalias, sizeof(modalias));
> diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> index e31a0261c53e..8a165be1a821 100644
> --- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
> +++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> @@ -161,7 +161,7 @@ static void dp_aux_ep_dev_release(struct device *dev)
> kfree(aux_ep_with_data);
> }
>
> -static int dp_aux_ep_dev_modalias(struct device *dev, struct kobj_uevent_env *env)
> +static int dp_aux_ep_dev_modalias(const struct device *dev, struct kobj_uevent_env *env)
> {
> return of_device_uevent_modalias(dev, env);
> }
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index 087e480b624c..51b78a52ab7f 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -136,9 +136,9 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv)
> return 0;
> }
>
> -static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int i2c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct i2c_client *client = to_i2c_client(dev);
> + const struct i2c_client *client = to_i2c_client(dev);
> int rc;
>
> rc = of_device_uevent_modalias(dev, env);
> diff --git a/drivers/i3c/device.c b/drivers/i3c/device.c
> index d111499061b2..1a6a8703dbc3 100644
> --- a/drivers/i3c/device.c
> +++ b/drivers/i3c/device.c
> @@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(i3c_device_do_setdasa);
> *
> * Retrieve I3C dev info.
> */
> -void i3c_device_get_info(struct i3c_device *dev,
> +void i3c_device_get_info(const struct i3c_device *dev,
> struct i3c_device_info *info)
> {
> if (!info)
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index d7e6f6c99aea..7a60e1c5e587 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -273,9 +273,9 @@ static struct attribute *i3c_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(i3c_device);
>
> -static int i3c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int i3c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct i3c_device *i3cdev = dev_to_i3cdev(dev);
> + const struct i3c_device *i3cdev = dev_to_i3cdev(dev);
> struct i3c_device_info devinfo;
> u16 manuf, part, ext;
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index ca2e3dd7188b..0336e799d713 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -1372,7 +1372,7 @@ INPUT_DEV_STRING_ATTR_SHOW(phys);
> INPUT_DEV_STRING_ATTR_SHOW(uniq);
>
> static int input_print_modalias_bits(char *buf, int size,
> - char name, unsigned long *bm,
> + char name, const unsigned long *bm,
> unsigned int min_bit, unsigned int max_bit)
> {
> int len = 0, i;
> @@ -1384,7 +1384,7 @@ static int input_print_modalias_bits(char *buf, int size,
> return len;
> }
>
> -static int input_print_modalias(char *buf, int size, struct input_dev *id,
> +static int input_print_modalias(char *buf, int size, const struct input_dev *id,
> int add_cr)
> {
> int len;
> @@ -1432,7 +1432,7 @@ static ssize_t input_dev_show_modalias(struct device *dev,
> }
> static DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
>
> -static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
> +static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
> int max, int add_cr);
>
> static ssize_t input_dev_show_properties(struct device *dev,
> @@ -1524,7 +1524,7 @@ static const struct attribute_group input_dev_id_attr_group = {
> .attrs = input_dev_id_attrs,
> };
>
> -static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
> +static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
> int max, int add_cr)
> {
> int i;
> @@ -1621,7 +1621,7 @@ static void input_dev_release(struct device *device)
> * device bitfields.
> */
> static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
> - const char *name, unsigned long *bitmap, int max)
> + const char *name, const unsigned long *bitmap, int max)
> {
> int len;
>
> @@ -1639,7 +1639,7 @@ static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
> }
>
> static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
> - struct input_dev *dev)
> + const struct input_dev *dev)
> {
> int len;
>
> @@ -1677,9 +1677,9 @@ static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
> return err; \
> } while (0)
>
> -static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env)
> +static int input_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
> {
> - struct input_dev *dev = to_input_dev(device);
> + const struct input_dev *dev = to_input_dev(device);
>
> INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x",
> dev->id.bustype, dev->id.vendor,
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index 527d9324742b..6bdad6341844 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -1614,7 +1614,7 @@ static void rc_dev_release(struct device *device)
> kfree(dev);
> }
>
> -static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
> +static int rc_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
> {
> struct rc_dev *dev = to_rc_dev(device);
> int ret = 0;
> diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c
> index de539938896e..407eb55050a6 100644
> --- a/drivers/platform/surface/aggregator/bus.c
> +++ b/drivers/platform/surface/aggregator/bus.c
> @@ -35,9 +35,9 @@ static struct attribute *ssam_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(ssam_device);
>
> -static int ssam_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int ssam_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct ssam_device *sdev = to_ssam_device(dev);
> + const struct ssam_device *sdev = to_ssam_device(dev);
>
> return add_uevent_var(env, "MODALIAS=ssam:d%02Xc%02Xt%02Xi%02Xf%02X",
> sdev->uid.domain, sdev->uid.category,
> diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
> index 04b3529f8929..26c9a0a85d49 100644
> --- a/drivers/soundwire/bus_type.c
> +++ b/drivers/soundwire/bus_type.c
> @@ -58,9 +58,9 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size)
> slave->id.sdw_version, slave->id.class_id);
> }
>
> -int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env)
> +int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct sdw_slave *slave = dev_to_sdw_dev(dev);
> + const struct sdw_slave *slave = dev_to_sdw_dev(dev);
> char modalias[32];
>
> sdw_slave_modalias(slave, modalias, sizeof(modalias));
> diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
> index 363d712aa364..cb6c304c445e 100644
> --- a/drivers/thunderbolt/switch.c
> +++ b/drivers/thunderbolt/switch.c
> @@ -2176,9 +2176,9 @@ static void tb_switch_release(struct device *dev)
> kfree(sw);
> }
>
> -static int tb_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int tb_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct tb_switch *sw = tb_to_switch(dev);
> + const struct tb_switch *sw = tb_to_switch(dev);
> const char *type;
>
> if (sw->config.thunderbolt_version == USB4_VERSION_1_0) {
> diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
> index f9786976f5ec..909da0a98134 100644
> --- a/drivers/thunderbolt/tb.h
> +++ b/drivers/thunderbolt/tb.h
> @@ -815,7 +815,7 @@ static inline bool tb_is_switch(const struct device *dev)
> return dev->type == &tb_switch_type;
> }
>
> -static inline struct tb_switch *tb_to_switch(struct device *dev)
> +static inline struct tb_switch *tb_to_switch(const struct device *dev)
> {
> if (tb_is_switch(dev))
> return container_of(dev, struct tb_switch, dev);
> diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
> index cfa83486c9da..7bf1e360b04c 100644
> --- a/drivers/thunderbolt/xdomain.c
> +++ b/drivers/thunderbolt/xdomain.c
> @@ -881,7 +881,7 @@ static ssize_t key_show(struct device *dev, struct device_attribute *attr,
> }
> static DEVICE_ATTR_RO(key);
>
> -static int get_modalias(struct tb_service *svc, char *buf, size_t size)
> +static int get_modalias(const struct tb_service *svc, char *buf, size_t size)
> {
> return snprintf(buf, size, "tbsvc:k%sp%08Xv%08Xr%08X", svc->key,
> svc->prtcid, svc->prtcvers, svc->prtcrevs);
> @@ -953,9 +953,9 @@ static const struct attribute_group *tb_service_attr_groups[] = {
> NULL,
> };
>
> -static int tb_service_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int tb_service_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct tb_service *svc = container_of(dev, struct tb_service, dev);
> + const struct tb_service *svc = container_of_const(dev, struct tb_service, dev);
> char modalias[64];
>
> get_modalias(svc, modalias, sizeof(modalias));
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index 0180e1e4e75d..aa80de3a8194 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -42,7 +42,7 @@ static struct attribute *serdev_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(serdev_device);
>
> -static int serdev_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int serdev_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> int rc;
>
> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
> index 127fac1af676..cc404bb7e8f7 100644
> --- a/drivers/usb/core/message.c
> +++ b/drivers/usb/core/message.c
> @@ -1819,11 +1819,11 @@ void usb_authorize_interface(struct usb_interface *intf)
> }
> }
>
> -static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_if_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct usb_device *usb_dev;
> - struct usb_interface *intf;
> - struct usb_host_interface *alt;
> + const struct usb_device *usb_dev;
> + const struct usb_interface *intf;
> + const struct usb_host_interface *alt;
>
> intf = to_usb_interface(dev);
> usb_dev = interface_to_usbdev(intf);
> diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
> index 11b15d7b357a..8527c06b65e6 100644
> --- a/drivers/usb/core/usb.c
> +++ b/drivers/usb/core/usb.c
> @@ -423,9 +423,9 @@ static void usb_release_dev(struct device *dev)
> kfree(udev);
> }
>
> -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct usb_device *usb_dev;
> + const struct usb_device *usb_dev;
>
> usb_dev = to_usb_device(dev);
>
> diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
> index 1b24492bb4e5..4b468bde19cf 100644
> --- a/drivers/usb/phy/phy.c
> +++ b/drivers/usb/phy/phy.c
> @@ -80,7 +80,7 @@ static struct usb_phy *__of_usb_find_phy(struct device_node *node)
> return ERR_PTR(-EPROBE_DEFER);
> }
>
> -static struct usb_phy *__device_to_usb_phy(struct device *dev)
> +static struct usb_phy *__device_to_usb_phy(const struct device *dev)
> {
> struct usb_phy *usb_phy;
>
> @@ -145,9 +145,9 @@ static void usb_phy_notify_charger_work(struct work_struct *work)
> kobject_uevent(&usb_phy->dev->kobj, KOBJ_CHANGE);
> }
>
> -static int usb_phy_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_phy_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> - struct usb_phy *usb_phy;
> + const struct usb_phy *usb_phy;
> char uchger_state[50] = { 0 };
> char uchger_type[50] = { 0 };
> unsigned long flags;
> diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
> index eacb46ec2ab3..56814ef80c24 100644
> --- a/drivers/usb/roles/class.c
> +++ b/drivers/usb/roles/class.c
> @@ -274,8 +274,7 @@ static const struct attribute_group *usb_role_switch_groups[] = {
> NULL,
> };
>
> -static int
> -usb_role_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int usb_role_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> int ret;
>
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 5897905cb4f0..a89d8fd3f46c 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1737,7 +1737,7 @@ static const struct attribute_group *typec_groups[] = {
> NULL
> };
>
> -static int typec_uevent(struct device *dev, struct kobj_uevent_env *env)
> +static int typec_uevent(const struct device *dev, struct kobj_uevent_env *env)
> {
> int ret;
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 5e6a876e17ba..564b62f13bd0 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -723,7 +723,7 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
> const void *acpi_device_get_match_data(const struct device *dev);
> extern bool acpi_driver_match_device(struct device *dev,
> const struct device_driver *drv);
> -int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
> +int acpi_device_uevent_modalias(const struct device *, struct kobj_uevent_env *);
> int acpi_device_modalias(struct device *, char *, int);
>
> struct platform_device *acpi_create_platform_device(struct acpi_device *,
> @@ -958,7 +958,7 @@ static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
> return NULL;
> }
>
> -static inline int acpi_device_uevent_modalias(struct device *dev,
> +static inline int acpi_device_uevent_modalias(const struct device *dev,
> struct kobj_uevent_env *env)
> {
> return -ENODEV;
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 44e3acae7b36..dad0614aad96 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -88,7 +88,7 @@ int subsys_virtual_register(struct bus_type *subsys,
> struct device_type {
> const char *name;
> const struct attribute_group **groups;
> - int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
> + int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
> char *(*devnode)(struct device *dev, umode_t *mode,
> kuid_t *uid, kgid_t *gid);
> void (*release)(struct device *dev);
> diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h
> index 68b558929aec..ce115ef08fec 100644
> --- a/include/linux/i3c/device.h
> +++ b/include/linux/i3c/device.h
> @@ -303,7 +303,7 @@ int i3c_device_do_priv_xfers(struct i3c_device *dev,
>
> int i3c_device_do_setdasa(struct i3c_device *dev);
>
> -void i3c_device_get_info(struct i3c_device *dev, struct i3c_device_info *info);
> +void i3c_device_get_info(const struct i3c_device *dev, struct i3c_device_info *info);
>
> struct i3c_ibi_payload {
> unsigned int len;
> diff --git a/include/linux/soundwire/sdw_type.h b/include/linux/soundwire/sdw_type.h
> index 52eb66cd11bc..d8c27f1e5559 100644
> --- a/include/linux/soundwire/sdw_type.h
> +++ b/include/linux/soundwire/sdw_type.h
> @@ -21,7 +21,7 @@ static inline int is_sdw_slave(const struct device *dev)
> int __sdw_register_driver(struct sdw_driver *drv, struct module *owner);
> void sdw_unregister_driver(struct sdw_driver *drv);
>
> -int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env);
> +int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env);
>
> /**
> * module_sdw_driver() - Helper macro for registering a Soundwire driver
> --
> 2.39.0
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply
* Re: [PATCH v4 1/2] dt-bindings: input: microchip,cap11xx: add cap1203, cap1293 and cap1298
From: Krzysztof Kozlowski @ 2023-01-11 13:14 UTC (permalink / raw)
To: Jiri Valek - 2N, linux-input
Cc: devicetree, dmitry.torokhov, krzysztof.kozlowski+dt, linux-kernel,
robh+dt, u.kleine-koenig
In-Reply-To: <20230111131111.475270-2-jiriv@axis.com>
On 11/01/2023 14:11, Jiri Valek - 2N wrote:
> Add support for cap1203, cap1293 and cap1298.
>
> Signed-off-by: Jiri Valek - 2N <jiriv@axis.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH v4 2/2] Input: cap11xx - add support for cap1203, cap1293 and cap1298
From: Jiri Valek - 2N @ 2023-01-11 13:11 UTC (permalink / raw)
To: linux-input
Cc: devicetree, dmitry.torokhov, krzysztof.kozlowski+dt, linux-kernel,
robh+dt, u.kleine-koenig, jiriv
In-Reply-To: <20230111131111.475270-1-jiriv@axis.com>
Add basic support for more CAP1xxx sensors.
All models from CAP1xxx family are register-compatible.
Some advanced features are not used and disabled by default.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Jiri Valek - 2N <jiriv@axis.com>
---
Changes in v2:
- Fixed if statement.
Changes in v3:
- Model names sorted alphabetically.
Changes in v4
- No changes.
drivers/input/keyboard/cap11xx.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c
index 79afd0386e3f..ce27168302a8 100644
--- a/drivers/input/keyboard/cap11xx.c
+++ b/drivers/input/keyboard/cap11xx.c
@@ -98,14 +98,20 @@ enum {
CAP1106,
CAP1126,
CAP1188,
+ CAP1203,
CAP1206,
+ CAP1293,
+ CAP1298
};
static const struct cap11xx_hw_model cap11xx_devices[] = {
[CAP1106] = { .product_id = 0x55, .num_channels = 6, .num_leds = 0, .no_gain = false },
[CAP1126] = { .product_id = 0x53, .num_channels = 6, .num_leds = 2, .no_gain = false },
[CAP1188] = { .product_id = 0x50, .num_channels = 8, .num_leds = 8, .no_gain = false },
+ [CAP1203] = { .product_id = 0x6d, .num_channels = 3, .num_leds = 0, .no_gain = true },
[CAP1206] = { .product_id = 0x67, .num_channels = 6, .num_leds = 0, .no_gain = true },
+ [CAP1293] = { .product_id = 0x6f, .num_channels = 3, .num_leds = 0, .no_gain = false },
+ [CAP1298] = { .product_id = 0x71, .num_channels = 8, .num_leds = 0, .no_gain = false },
};
static const struct reg_default cap11xx_reg_defaults[] = {
@@ -377,7 +383,8 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client)
if (error < 0)
return error;
- dev_info(dev, "CAP11XX detected, revision 0x%02x\n", rev);
+ dev_info(dev, "CAP11XX detected, model %s, revision 0x%02x\n",
+ id->name, rev);
node = dev->of_node;
if (!of_property_read_u32(node, "microchip,sensor-gain", &gain32)) {
@@ -390,7 +397,9 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client)
dev_err(dev, "Invalid sensor-gain value %d\n", gain32);
}
- if (id->driver_data != CAP1206) {
+ if ((id->driver_data == CAP1106) ||
+ (id->driver_data == CAP1126) ||
+ (id->driver_data == CAP1188)) {
if (of_property_read_bool(node, "microchip,irq-active-high")) {
error = regmap_update_bits(priv->regmap,
CAP11XX_REG_CONFIG2,
@@ -483,7 +492,10 @@ static const struct of_device_id cap11xx_dt_ids[] = {
{ .compatible = "microchip,cap1106", },
{ .compatible = "microchip,cap1126", },
{ .compatible = "microchip,cap1188", },
+ { .compatible = "microchip,cap1203", },
{ .compatible = "microchip,cap1206", },
+ { .compatible = "microchip,cap1293", },
+ { .compatible = "microchip,cap1298", },
{}
};
MODULE_DEVICE_TABLE(of, cap11xx_dt_ids);
@@ -492,7 +504,10 @@ static const struct i2c_device_id cap11xx_i2c_ids[] = {
{ "cap1106", CAP1106 },
{ "cap1126", CAP1126 },
{ "cap1188", CAP1188 },
+ { "cap1203", CAP1203 },
{ "cap1206", CAP1206 },
+ { "cap1293", CAP1293 },
+ { "cap1298", CAP1298 },
{}
};
MODULE_DEVICE_TABLE(i2c, cap11xx_i2c_ids);
--
2.25.1
^ permalink raw reply related
* [PATCH v4 0/2] Input: cap11xx add support for cap1203, cap1293 and cap1298
From: Jiri Valek - 2N @ 2023-01-11 13:11 UTC (permalink / raw)
To: linux-input
Cc: devicetree, dmitry.torokhov, krzysztof.kozlowski+dt, linux-kernel,
robh+dt, u.kleine-koenig, jiriv
PATCH 1 - add compatible string for new models
PATCH 2 - add support for new models into driver
Changes in v2:
- Fixed if statement in PATCH 2.
Changes in v3:
- Model names sorted alphabetically in PATCH 2.
Changes in v4:
- Model names sorted alphabetically also in PATCH 1.
Jiri Valek - 2N (2):
dt-bindings: input: microchip,cap11xx: add cap1203, cap1293 and
cap1298
Input: cap11xx - add support for cap1203, cap1293 and cap1298
.../bindings/input/microchip,cap11xx.yaml | 3 +++
drivers/input/keyboard/cap11xx.c | 19 +++++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
--
2.25.1
^ permalink raw reply
* [PATCH v4 1/2] dt-bindings: input: microchip,cap11xx: add cap1203, cap1293 and cap1298
From: Jiri Valek - 2N @ 2023-01-11 13:11 UTC (permalink / raw)
To: linux-input
Cc: devicetree, dmitry.torokhov, krzysztof.kozlowski+dt, linux-kernel,
robh+dt, u.kleine-koenig, jiriv
In-Reply-To: <20230111131111.475270-1-jiriv@axis.com>
Add support for cap1203, cap1293 and cap1298.
Signed-off-by: Jiri Valek - 2N <jiriv@axis.com>
---
Changes in v2:
- No changes.
Changes in v3:
- No changes.
Changes in v4
- Model names sorted alphabetically.
Documentation/devicetree/bindings/input/microchip,cap11xx.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
index 67d4d8f86a2d..5fa625b5c5fb 100644
--- a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
+++ b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
@@ -19,7 +19,10 @@ properties:
- microchip,cap1106
- microchip,cap1126
- microchip,cap1188
+ - microchip,cap1203
- microchip,cap1206
+ - microchip,cap1293
+ - microchip,cap1298
reg:
maxItems: 1
--
2.25.1
^ permalink raw reply related
* [dtor-input:next] BUILD SUCCESS 407da561244b9d51e6a794d6305ba38ec2c9d907
From: kernel test robot @ 2023-01-11 13:07 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
branch HEAD: 407da561244b9d51e6a794d6305ba38ec2c9d907 Merge tag 'v6.2-rc3' into next
elapsed time: 725m
configs tested: 110
configs skipped: 2
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arc defconfig
s390 allmodconfig
alpha defconfig
s390 defconfig
s390 allyesconfig
x86_64 allnoconfig
powerpc allnoconfig
mips allyesconfig
powerpc allmodconfig
s390 randconfig-r044-20230110
sh allmodconfig
arc randconfig-r043-20230110
x86_64 rhel-8.3-bpf
x86_64 rhel-8.3-syz
x86_64 rhel-8.3-kunit
riscv randconfig-r042-20230110
x86_64 rhel-8.3-kvm
x86_64 rhel-8.3-func
x86_64 rhel-8.3-kselftests
ia64 allmodconfig
m68k allyesconfig
m68k allmodconfig
arc allyesconfig
alpha allyesconfig
um x86_64_defconfig
um i386_defconfig
x86_64 defconfig
x86_64 allyesconfig
x86_64 rhel-8.3
i386 allyesconfig
i386 defconfig
i386 randconfig-a012
i386 randconfig-a014
i386 randconfig-a016
arm64 allyesconfig
arm defconfig
arm allyesconfig
x86_64 randconfig-a006
x86_64 randconfig-a004
x86_64 randconfig-a002
m68k amiga_defconfig
riscv allmodconfig
sh rts7751r2dplus_defconfig
m68k defconfig
sh rsk7201_defconfig
x86_64 randconfig-a011
x86_64 randconfig-a013
x86_64 randconfig-a015
sparc defconfig
xtensa allyesconfig
csky defconfig
sparc allyesconfig
x86_64 kexec
powerpc taishan_defconfig
arm assabet_defconfig
parisc generic-64bit_defconfig
mips vocore2_defconfig
i386 debian-10.3-kvm
i386 debian-10.3-kunit
i386 debian-10.3-func
powerpc iss476-smp_defconfig
sh r7780mp_defconfig
mips gcw0_defconfig
mips bigsur_defconfig
sh sdk7786_defconfig
sh espt_defconfig
openrisc alldefconfig
nios2 allyesconfig
nios2 defconfig
parisc defconfig
parisc64 defconfig
parisc allyesconfig
arc tb10x_defconfig
csky alldefconfig
arm keystone_defconfig
sh rsk7264_defconfig
sh se7722_defconfig
i386 alldefconfig
sh microdev_defconfig
sh urquell_defconfig
loongarch defconfig
loongarch allnoconfig
loongarch allmodconfig
arm mvebu_v7_defconfig
sh magicpanelr2_defconfig
arm badge4_defconfig
i386 randconfig-c001
s390 zfcpdump_defconfig
arm lubbock_defconfig
powerpc redwood_defconfig
sh rsk7203_defconfig
sh hp6xx_defconfig
clang tested configs:
arm randconfig-r046-20230110
hexagon randconfig-r045-20230110
hexagon randconfig-r041-20230110
x86_64 randconfig-a005
x86_64 randconfig-a003
x86_64 randconfig-a001
x86_64 randconfig-a012
x86_64 randconfig-a014
x86_64 randconfig-a016
x86_64 rhel-8.3-rust
i386 randconfig-a002
i386 randconfig-a006
i386 randconfig-a004
x86_64 randconfig-k001
riscv randconfig-r042-20230111
s390 randconfig-r044-20230111
hexagon randconfig-r041-20230111
hexagon randconfig-r045-20230111
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply
* Re: [PATCH v2 05/16] driver core: make struct device_type.uevent() take a const *
From: Vinod Koul @ 2023-01-11 12:34 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jens Axboe, Len Brown, Stefan Richter, Wolfram Sang,
Alexandre Belloni, Dmitry Torokhov, Sean Young, Rob Herring,
Frank Rowand, Maximilian Luz, Hans de Goede, Mark Gross,
Bard Liao, Pierre-Louis Bossart, Sanyog Kale, Andreas Noever,
Michael Jamet, Yehezkel Bernat, Jiri Slaby, Heikki Krogerus,
Matthew Wilcox (Oracle), Martin K. Petersen, Chaitanya Kulkarni,
Ming Lei, Jilin Yuan, Alan Stern, Andy Shevchenko, Sakari Ailus,
Jason Gunthorpe, Thomas Gleixner, Ira Weiny, Dan Williams,
Won Chung, alsa-devel, devicetree, linux-acpi, linux-block,
linux-i2c, linux-i3c, linux-input, linux-media, linux-serial,
linux-usb, linux1394-devel, platform-driver-x86,
Rafael J . Wysocki, Mika Westerberg, Mauro Carvalho Chehab
In-Reply-To: <20230111113018.459199-6-gregkh@linuxfoundation.org>
On 11-01-23, 12:30, Greg Kroah-Hartman wrote:
> The uevent() callback in struct device_type should not be modifying the
> device that is passed into it, so mark it as a const * and propagate the
> function signature changes out into all relevant subsystems that use
> this callback.
Acked-by: Vinod Koul <vkoul@kernel.org>
--
~Vinod
^ permalink raw reply
* Re: [PATCH v2 05/16] driver core: make struct device_type.uevent() take a const *
From: Wolfram Sang @ 2023-01-11 11:50 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jens Axboe, Len Brown, Stefan Richter,
Alexandre Belloni, Dmitry Torokhov, Sean Young, Rob Herring,
Frank Rowand, Maximilian Luz, Hans de Goede, Mark Gross,
Vinod Koul, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
Andreas Noever, Michael Jamet, Yehezkel Bernat, Jiri Slaby,
Heikki Krogerus, Matthew Wilcox (Oracle), Martin K. Petersen,
Chaitanya Kulkarni, Ming Lei, Jilin Yuan, Alan Stern,
Andy Shevchenko, Sakari Ailus, Jason Gunthorpe, Thomas Gleixner,
Ira Weiny, Dan Williams, Won Chung, alsa-devel, devicetree,
linux-acpi, linux-block, linux-i2c, linux-i3c, linux-input,
linux-media, linux-serial, linux-usb, linux1394-devel,
platform-driver-x86, Rafael J . Wysocki, Mika Westerberg,
Mauro Carvalho Chehab
In-Reply-To: <20230111113018.459199-6-gregkh@linuxfoundation.org>
[-- Attachment #1: Type: text/plain, Size: 2648 bytes --]
On Wed, Jan 11, 2023 at 12:30:07PM +0100, Greg Kroah-Hartman wrote:
> The uevent() callback in struct device_type should not be modifying the
> device that is passed into it, so mark it as a const * and propagate the
> function signature changes out into all relevant subsystems that use
> this callback.
>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
> Cc: Wolfram Sang <wsa@kernel.org>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Sean Young <sean@mess.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: Maximilian Luz <luzmaximilian@gmail.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Cc: Sanyog Kale <sanyog.r.kale@intel.com>
> Cc: Andreas Noever <andreas.noever@gmail.com>
> Cc: Michael Jamet <michael.jamet@intel.com>
> Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Chaitanya Kulkarni <kch@nvidia.com>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Won Chung <wonchung@google.com>
> Cc: alsa-devel@alsa-project.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-acpi@vger.kernel.org
> Cc: linux-block@vger.kernel.org
> Cc: linux-i2c@vger.kernel.org
> Cc: linux-i3c@lists.infradead.org
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-media@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: linux1394-devel@lists.sourceforge.net
> Cc: platform-driver-x86@vger.kernel.org
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt
> Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Wolfram Sang <wsa@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* [PATCH v2 05/16] driver core: make struct device_type.uevent() take a const *
From: Greg Kroah-Hartman @ 2023-01-11 11:30 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Jens Axboe, Len Brown, Stefan Richter,
Wolfram Sang, Alexandre Belloni, Dmitry Torokhov, Sean Young,
Rob Herring, Frank Rowand, Maximilian Luz, Hans de Goede,
Mark Gross, Vinod Koul, Bard Liao, Pierre-Louis Bossart,
Sanyog Kale, Andreas Noever, Michael Jamet, Yehezkel Bernat,
Jiri Slaby, Heikki Krogerus, Matthew Wilcox (Oracle),
Martin K. Petersen, Chaitanya Kulkarni, Ming Lei, Jilin Yuan,
Alan Stern, Andy Shevchenko, Sakari Ailus, Jason Gunthorpe,
Thomas Gleixner, Ira Weiny, Dan Williams, Won Chung, alsa-devel,
devicetree, linux-acpi, linux-block, linux-i2c, linux-i3c,
linux-input, linux-media, linux-serial, linux-usb,
linux1394-devel, platform-driver-x86, Rafael J . Wysocki,
Mika Westerberg, Mauro Carvalho Chehab
In-Reply-To: <20230111113018.459199-1-gregkh@linuxfoundation.org>
The uevent() callback in struct device_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Len Brown <lenb@kernel.org>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Wolfram Sang <wsa@kernel.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Sean Young <sean@mess.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Sanyog Kale <sanyog.r.kale@intel.com>
Cc: Andreas Noever <andreas.noever@gmail.com>
Cc: Michael Jamet <michael.jamet@intel.com>
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Won Chung <wonchung@google.com>
Cc: alsa-devel@alsa-project.org
Cc: devicetree@vger.kernel.org
Cc: linux-acpi@vger.kernel.org
Cc: linux-block@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Cc: linux-i3c@lists.infradead.org
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: platform-driver-x86@vger.kernel.org
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
block/partitions/core.c | 4 ++--
drivers/acpi/device_sysfs.c | 8 ++++----
drivers/acpi/internal.h | 2 +-
drivers/firewire/core-device.c | 8 ++++----
drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +-
drivers/i2c/i2c-core-base.c | 4 ++--
drivers/i3c/device.c | 2 +-
drivers/i3c/master.c | 4 ++--
drivers/input/input.c | 16 ++++++++--------
drivers/media/rc/rc-main.c | 2 +-
drivers/platform/surface/aggregator/bus.c | 4 ++--
drivers/soundwire/bus_type.c | 4 ++--
drivers/thunderbolt/switch.c | 4 ++--
drivers/thunderbolt/tb.h | 2 +-
drivers/thunderbolt/xdomain.c | 6 +++---
drivers/tty/serdev/core.c | 2 +-
drivers/usb/core/message.c | 8 ++++----
drivers/usb/core/usb.c | 4 ++--
drivers/usb/phy/phy.c | 6 +++---
drivers/usb/roles/class.c | 3 +--
drivers/usb/typec/class.c | 2 +-
include/linux/acpi.h | 4 ++--
include/linux/device.h | 2 +-
include/linux/i3c/device.h | 2 +-
include/linux/soundwire/sdw_type.h | 2 +-
25 files changed, 53 insertions(+), 54 deletions(-)
diff --git a/block/partitions/core.c b/block/partitions/core.c
index b8112f52d388..7b8ef6296abd 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -254,9 +254,9 @@ static void part_release(struct device *dev)
iput(dev_to_bdev(dev)->bd_inode);
}
-static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int part_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct block_device *part = dev_to_bdev(dev);
+ const struct block_device *part = dev_to_bdev(dev);
add_uevent_var(env, "PARTN=%u", part->bd_partno);
if (part->bd_meta_info && part->bd_meta_info->volname[0])
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 120873dad2cc..daff2c0c5c52 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -133,7 +133,7 @@ static void acpi_hide_nondev_subnodes(struct acpi_device_data *data)
* -EINVAL: output error
* -ENOMEM: output is truncated
*/
-static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
+static int create_pnp_modalias(const struct acpi_device *acpi_dev, char *modalias,
int size)
{
int len;
@@ -191,7 +191,7 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
* only be called for devices having ACPI_DT_NAMESPACE_HID in their list of
* ACPI/PNP IDs.
*/
-static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
+static int create_of_modalias(const struct acpi_device *acpi_dev, char *modalias,
int size)
{
struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER };
@@ -239,7 +239,7 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
return len;
}
-int __acpi_device_uevent_modalias(struct acpi_device *adev,
+int __acpi_device_uevent_modalias(const struct acpi_device *adev,
struct kobj_uevent_env *env)
{
int len;
@@ -277,7 +277,7 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
* Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
* hid:IBM0001 and cid:ACPI0001 you get: "acpi:IBM0001:ACPI0001".
*/
-int acpi_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)
+int acpi_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env)
{
return __acpi_device_uevent_modalias(acpi_companion_match(dev), env);
}
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index ec584442fb29..06ad497067ac 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -120,7 +120,7 @@ int acpi_bus_register_early_device(int type);
Device Matching and Notification
-------------------------------------------------------------------------- */
struct acpi_device *acpi_companion_match(const struct device *dev);
-int __acpi_device_uevent_modalias(struct acpi_device *adev,
+int __acpi_device_uevent_modalias(const struct acpi_device *adev,
struct kobj_uevent_env *env);
/* --------------------------------------------------------------------------
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index adddd8c45d0c..aa597cda0d88 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -133,7 +133,7 @@ static void get_ids(const u32 *directory, int *id)
}
}
-static void get_modalias_ids(struct fw_unit *unit, int *id)
+static void get_modalias_ids(const struct fw_unit *unit, int *id)
{
get_ids(&fw_parent_device(unit)->config_rom[5], id);
get_ids(unit->directory, id);
@@ -195,7 +195,7 @@ static void fw_unit_remove(struct device *dev)
driver->remove(fw_unit(dev));
}
-static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
+static int get_modalias(const struct fw_unit *unit, char *buffer, size_t buffer_size)
{
int id[] = {0, 0, 0, 0};
@@ -206,9 +206,9 @@ static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
id[0], id[1], id[2], id[3]);
}
-static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int fw_unit_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct fw_unit *unit = fw_unit(dev);
+ const struct fw_unit *unit = fw_unit(dev);
char modalias[64];
get_modalias(unit, modalias, sizeof(modalias));
diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
index e31a0261c53e..8a165be1a821 100644
--- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
+++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
@@ -161,7 +161,7 @@ static void dp_aux_ep_dev_release(struct device *dev)
kfree(aux_ep_with_data);
}
-static int dp_aux_ep_dev_modalias(struct device *dev, struct kobj_uevent_env *env)
+static int dp_aux_ep_dev_modalias(const struct device *dev, struct kobj_uevent_env *env)
{
return of_device_uevent_modalias(dev, env);
}
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 087e480b624c..51b78a52ab7f 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -136,9 +136,9 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv)
return 0;
}
-static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int i2c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct i2c_client *client = to_i2c_client(dev);
+ const struct i2c_client *client = to_i2c_client(dev);
int rc;
rc = of_device_uevent_modalias(dev, env);
diff --git a/drivers/i3c/device.c b/drivers/i3c/device.c
index d111499061b2..1a6a8703dbc3 100644
--- a/drivers/i3c/device.c
+++ b/drivers/i3c/device.c
@@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(i3c_device_do_setdasa);
*
* Retrieve I3C dev info.
*/
-void i3c_device_get_info(struct i3c_device *dev,
+void i3c_device_get_info(const struct i3c_device *dev,
struct i3c_device_info *info)
{
if (!info)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index d7e6f6c99aea..7a60e1c5e587 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -273,9 +273,9 @@ static struct attribute *i3c_device_attrs[] = {
};
ATTRIBUTE_GROUPS(i3c_device);
-static int i3c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int i3c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct i3c_device *i3cdev = dev_to_i3cdev(dev);
+ const struct i3c_device *i3cdev = dev_to_i3cdev(dev);
struct i3c_device_info devinfo;
u16 manuf, part, ext;
diff --git a/drivers/input/input.c b/drivers/input/input.c
index ca2e3dd7188b..0336e799d713 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1372,7 +1372,7 @@ INPUT_DEV_STRING_ATTR_SHOW(phys);
INPUT_DEV_STRING_ATTR_SHOW(uniq);
static int input_print_modalias_bits(char *buf, int size,
- char name, unsigned long *bm,
+ char name, const unsigned long *bm,
unsigned int min_bit, unsigned int max_bit)
{
int len = 0, i;
@@ -1384,7 +1384,7 @@ static int input_print_modalias_bits(char *buf, int size,
return len;
}
-static int input_print_modalias(char *buf, int size, struct input_dev *id,
+static int input_print_modalias(char *buf, int size, const struct input_dev *id,
int add_cr)
{
int len;
@@ -1432,7 +1432,7 @@ static ssize_t input_dev_show_modalias(struct device *dev,
}
static DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
-static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
+static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
int max, int add_cr);
static ssize_t input_dev_show_properties(struct device *dev,
@@ -1524,7 +1524,7 @@ static const struct attribute_group input_dev_id_attr_group = {
.attrs = input_dev_id_attrs,
};
-static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
+static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
int max, int add_cr)
{
int i;
@@ -1621,7 +1621,7 @@ static void input_dev_release(struct device *device)
* device bitfields.
*/
static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
- const char *name, unsigned long *bitmap, int max)
+ const char *name, const unsigned long *bitmap, int max)
{
int len;
@@ -1639,7 +1639,7 @@ static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
}
static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
- struct input_dev *dev)
+ const struct input_dev *dev)
{
int len;
@@ -1677,9 +1677,9 @@ static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
return err; \
} while (0)
-static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env)
+static int input_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
{
- struct input_dev *dev = to_input_dev(device);
+ const struct input_dev *dev = to_input_dev(device);
INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x",
dev->id.bustype, dev->id.vendor,
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 527d9324742b..6bdad6341844 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1614,7 +1614,7 @@ static void rc_dev_release(struct device *device)
kfree(dev);
}
-static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
+static int rc_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
{
struct rc_dev *dev = to_rc_dev(device);
int ret = 0;
diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c
index de539938896e..407eb55050a6 100644
--- a/drivers/platform/surface/aggregator/bus.c
+++ b/drivers/platform/surface/aggregator/bus.c
@@ -35,9 +35,9 @@ static struct attribute *ssam_device_attrs[] = {
};
ATTRIBUTE_GROUPS(ssam_device);
-static int ssam_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int ssam_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct ssam_device *sdev = to_ssam_device(dev);
+ const struct ssam_device *sdev = to_ssam_device(dev);
return add_uevent_var(env, "MODALIAS=ssam:d%02Xc%02Xt%02Xi%02Xf%02X",
sdev->uid.domain, sdev->uid.category,
diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
index 04b3529f8929..26c9a0a85d49 100644
--- a/drivers/soundwire/bus_type.c
+++ b/drivers/soundwire/bus_type.c
@@ -58,9 +58,9 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size)
slave->id.sdw_version, slave->id.class_id);
}
-int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env)
+int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct sdw_slave *slave = dev_to_sdw_dev(dev);
+ const struct sdw_slave *slave = dev_to_sdw_dev(dev);
char modalias[32];
sdw_slave_modalias(slave, modalias, sizeof(modalias));
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 363d712aa364..cb6c304c445e 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2176,9 +2176,9 @@ static void tb_switch_release(struct device *dev)
kfree(sw);
}
-static int tb_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int tb_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct tb_switch *sw = tb_to_switch(dev);
+ const struct tb_switch *sw = tb_to_switch(dev);
const char *type;
if (sw->config.thunderbolt_version == USB4_VERSION_1_0) {
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index f9786976f5ec..909da0a98134 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -815,7 +815,7 @@ static inline bool tb_is_switch(const struct device *dev)
return dev->type == &tb_switch_type;
}
-static inline struct tb_switch *tb_to_switch(struct device *dev)
+static inline struct tb_switch *tb_to_switch(const struct device *dev)
{
if (tb_is_switch(dev))
return container_of(dev, struct tb_switch, dev);
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index cfa83486c9da..7bf1e360b04c 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -881,7 +881,7 @@ static ssize_t key_show(struct device *dev, struct device_attribute *attr,
}
static DEVICE_ATTR_RO(key);
-static int get_modalias(struct tb_service *svc, char *buf, size_t size)
+static int get_modalias(const struct tb_service *svc, char *buf, size_t size)
{
return snprintf(buf, size, "tbsvc:k%sp%08Xv%08Xr%08X", svc->key,
svc->prtcid, svc->prtcvers, svc->prtcrevs);
@@ -953,9 +953,9 @@ static const struct attribute_group *tb_service_attr_groups[] = {
NULL,
};
-static int tb_service_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int tb_service_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct tb_service *svc = container_of(dev, struct tb_service, dev);
+ const struct tb_service *svc = container_of_const(dev, struct tb_service, dev);
char modalias[64];
get_modalias(svc, modalias, sizeof(modalias));
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 0180e1e4e75d..aa80de3a8194 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -42,7 +42,7 @@ static struct attribute *serdev_device_attrs[] = {
};
ATTRIBUTE_GROUPS(serdev_device);
-static int serdev_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int serdev_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
int rc;
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 127fac1af676..cc404bb7e8f7 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1819,11 +1819,11 @@ void usb_authorize_interface(struct usb_interface *intf)
}
}
-static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_if_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct usb_device *usb_dev;
- struct usb_interface *intf;
- struct usb_host_interface *alt;
+ const struct usb_device *usb_dev;
+ const struct usb_interface *intf;
+ const struct usb_host_interface *alt;
intf = to_usb_interface(dev);
usb_dev = interface_to_usbdev(intf);
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 11b15d7b357a..8527c06b65e6 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -423,9 +423,9 @@ static void usb_release_dev(struct device *dev)
kfree(udev);
}
-static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct usb_device *usb_dev;
+ const struct usb_device *usb_dev;
usb_dev = to_usb_device(dev);
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index 1b24492bb4e5..4b468bde19cf 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -80,7 +80,7 @@ static struct usb_phy *__of_usb_find_phy(struct device_node *node)
return ERR_PTR(-EPROBE_DEFER);
}
-static struct usb_phy *__device_to_usb_phy(struct device *dev)
+static struct usb_phy *__device_to_usb_phy(const struct device *dev)
{
struct usb_phy *usb_phy;
@@ -145,9 +145,9 @@ static void usb_phy_notify_charger_work(struct work_struct *work)
kobject_uevent(&usb_phy->dev->kobj, KOBJ_CHANGE);
}
-static int usb_phy_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_phy_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
- struct usb_phy *usb_phy;
+ const struct usb_phy *usb_phy;
char uchger_state[50] = { 0 };
char uchger_type[50] = { 0 };
unsigned long flags;
diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
index eacb46ec2ab3..56814ef80c24 100644
--- a/drivers/usb/roles/class.c
+++ b/drivers/usb/roles/class.c
@@ -274,8 +274,7 @@ static const struct attribute_group *usb_role_switch_groups[] = {
NULL,
};
-static int
-usb_role_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_role_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
int ret;
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index 5897905cb4f0..a89d8fd3f46c 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -1737,7 +1737,7 @@ static const struct attribute_group *typec_groups[] = {
NULL
};
-static int typec_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int typec_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
int ret;
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 5e6a876e17ba..564b62f13bd0 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -723,7 +723,7 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
const void *acpi_device_get_match_data(const struct device *dev);
extern bool acpi_driver_match_device(struct device *dev,
const struct device_driver *drv);
-int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
+int acpi_device_uevent_modalias(const struct device *, struct kobj_uevent_env *);
int acpi_device_modalias(struct device *, char *, int);
struct platform_device *acpi_create_platform_device(struct acpi_device *,
@@ -958,7 +958,7 @@ static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
return NULL;
}
-static inline int acpi_device_uevent_modalias(struct device *dev,
+static inline int acpi_device_uevent_modalias(const struct device *dev,
struct kobj_uevent_env *env)
{
return -ENODEV;
diff --git a/include/linux/device.h b/include/linux/device.h
index 44e3acae7b36..dad0614aad96 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -88,7 +88,7 @@ int subsys_virtual_register(struct bus_type *subsys,
struct device_type {
const char *name;
const struct attribute_group **groups;
- int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
+ int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
char *(*devnode)(struct device *dev, umode_t *mode,
kuid_t *uid, kgid_t *gid);
void (*release)(struct device *dev);
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h
index 68b558929aec..ce115ef08fec 100644
--- a/include/linux/i3c/device.h
+++ b/include/linux/i3c/device.h
@@ -303,7 +303,7 @@ int i3c_device_do_priv_xfers(struct i3c_device *dev,
int i3c_device_do_setdasa(struct i3c_device *dev);
-void i3c_device_get_info(struct i3c_device *dev, struct i3c_device_info *info);
+void i3c_device_get_info(const struct i3c_device *dev, struct i3c_device_info *info);
struct i3c_ibi_payload {
unsigned int len;
diff --git a/include/linux/soundwire/sdw_type.h b/include/linux/soundwire/sdw_type.h
index 52eb66cd11bc..d8c27f1e5559 100644
--- a/include/linux/soundwire/sdw_type.h
+++ b/include/linux/soundwire/sdw_type.h
@@ -21,7 +21,7 @@ static inline int is_sdw_slave(const struct device *dev)
int __sdw_register_driver(struct sdw_driver *drv, struct module *owner);
void sdw_unregister_driver(struct sdw_driver *drv);
-int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env);
+int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env);
/**
* module_sdw_driver() - Helper macro for registering a Soundwire driver
--
2.39.0
^ permalink raw reply related
* Re: [PATCH] HID: hid-logitech-hidpp: Add support for Logitech G923 wheel Xbox Edition
From: Bastien Nocera @ 2023-01-11 10:28 UTC (permalink / raw)
To: Walt Holman, linux-kernel, linux-input
In-Reply-To: <1912021550.81.1672759744435.JavaMail.zimbra@holmansrus.com>
Hey Walt,
On Tue, 2023-01-03 at 09:29 -0600, Walt Holman wrote:
> Hello,
>
> This patch adds support for the Logitech G923 Xbox edition steering
> wheel. This uses the hid-logitech-hidpp kernel module and from my
> testing, force feedback and all buttons work. This requires the
> usb_modeswitch application to setup the device in PC mode with a
> magic string that is the same as the Logitech 920 wheel. Originally I
> had massaged a patch I found for this wheel, however, much of it was
> unnecessary and I culled it back to just adding the ID's. Let me know
> if you need anything else or have any questions. Thanks,
>
> Signed-off-by: Walt Holman walt@holmansrus.com
>
You'll want to follow:
https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
to submit this patch. It definitely shouldn't be an attachment :)
Cheers
^ permalink raw reply
* Re: [PATCH 1/2] HID: hid-steam: Add Steam Deck support
From: Bastien Nocera @ 2023-01-11 10:24 UTC (permalink / raw)
To: Vicki Pfau, Jiri Kosina, Benjamin Tissoires, linux-input
In-Reply-To: <20230111012336.2915827-1-vi@endrift.com>
On Tue, 2023-01-10 at 17:23 -0800, Vicki Pfau wrote:
> Add preliminary support for the Steam Deck's controller interface.
> Currently,
> this only supports the controller inputs and toggling lizard mode. It
> does not
> support any of the advanced features, such as the motion sensors or
> force-feedback.
I had to look up what "lizard mode" is. This is a pretty awful name for
a "compatibility"/"boot" mode. This should probably be defined in the
commit message as that's a Valve specific term.
>
> The Steam Deck also includes a heartbeat for lizard mode that
> switches it back
> on if no reports have been received within a few milliseconds. The
> official
> Steam client handles this by sending a handful of configuration
> reports every
> few ms, so we copy this behavior by sending configuration reports to
> disable
> the mouse and reset the digital mappings every 5ms. As this isn't
> needed for
> the older Steam Controller, this is only done on the Steam Deck.
>
> Signed-off-by: Vicki Pfau <vi@endrift.com>
> ---
> drivers/hid/hid-ids.h | 1 +
> drivers/hid/hid-steam.c | 335 ++++++++++++++++++++++++++++++++++++--
> --
> 2 files changed, 306 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 82713ef3aaa6..33269113acc7 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -1183,6 +1183,7 @@
> #define USB_VENDOR_ID_VALVE 0x28de
> #define USB_DEVICE_ID_STEAM_CONTROLLER 0x1102
> #define USB_DEVICE_ID_STEAM_CONTROLLER_WIRELESS 0x1142
> +#define USB_DEVICE_ID_STEAM_DECK 0x1205
>
> #define USB_VENDOR_ID_STEELSERIES 0x1038
> #define USB_DEVICE_ID_STEELSERIES_SRWS1 0x1410
> diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
> index 8ee43cb225fc..efd192d6c51a 100644
> --- a/drivers/hid/hid-steam.c
> +++ b/drivers/hid/hid-steam.c
> @@ -3,6 +3,7 @@
> * HID driver for Valve Steam Controller
> *
> * Copyright (c) 2018 Rodrigo Rivas Costa
> <rodrigorivascosta@gmail.com>
> + * Copyright (c) 2022 Valve Software
> *
> * Supports both the wired and wireless interfaces.
> *
> @@ -53,6 +54,7 @@ static DEFINE_MUTEX(steam_devices_lock);
> static LIST_HEAD(steam_devices);
>
> #define STEAM_QUIRK_WIRELESS BIT(0)
> +#define STEAM_QUIRK_DECK BIT(1)
>
> /* Touch pads are 40 mm in diameter and 65535 units */
> #define STEAM_PAD_RESOLUTION 1638
> @@ -60,6 +62,10 @@ static LIST_HEAD(steam_devices);
> #define STEAM_TRIGGER_RESOLUTION 51
> /* Joystick runs are about 5 mm and 256 units */
> #define STEAM_JOYSTICK_RESOLUTION 51
> +/* Trigger runs are about 6 mm and 32768 units */
> +#define STEAM_DECK_TRIGGER_RESOLUTION 5461
> +/* Joystick runs are about 5 mm and 32768 units */
> +#define STEAM_DECK_JOYSTICK_RESOLUTION 6553
>
> #define STEAM_PAD_FUZZ 256
>
> @@ -92,11 +98,14 @@ static LIST_HEAD(steam_devices);
> #define STEAM_REG_RPAD_MARGIN 0x18
> #define STEAM_REG_LED 0x2d
> #define STEAM_REG_GYRO_MODE 0x30
> +#define STEAM_REG_LPAD_CLICK_PRESSURE 0x34
> +#define STEAM_REG_RPAD_CLICK_PRESSURE 0x35
>
> /* Raw event identifiers */
> #define STEAM_EV_INPUT_DATA 0x01
> #define STEAM_EV_CONNECT 0x03
> #define STEAM_EV_BATTERY 0x04
> +#define STEAM_EV_DECK_INPUT_DATA 0x09
>
> /* Values for GYRO_MODE (bitmask) */
> #define STEAM_GYRO_MODE_OFF 0x0000
> @@ -124,6 +133,7 @@ struct steam_device {
> struct power_supply __rcu *battery;
> u8 battery_charge;
> u16 voltage;
> + struct delayed_work heartbeat;
> };
>
> static int steam_recv_report(struct steam_device *steam,
> @@ -193,7 +203,7 @@ static int steam_send_report(struct steam_device
> *steam,
> */
> do {
> ret = hid_hw_raw_request(steam->hdev, 0,
> - buf, size + 1,
> + buf, max(size, 64) + 1,
> HID_FEATURE_REPORT,
> HID_REQ_SET_REPORT);
> if (ret != -EPIPE)
> break;
> @@ -219,6 +229,7 @@ static int steam_write_registers(struct
> steam_device *steam,
> u8 reg;
> u16 val;
> u8 cmd[64] = {STEAM_CMD_WRITE_REGISTER, 0x00};
> + int ret;
> va_list args;
>
> va_start(args, steam);
> @@ -234,7 +245,16 @@ static int steam_write_registers(struct
> steam_device *steam,
> }
> va_end(args);
>
> - return steam_send_report(steam, cmd, 2 + cmd[1]);
> + ret = steam_send_report(steam, cmd, 2 + cmd[1]);
> + if (ret < 0)
> + return ret;
> +
> + /*
> + * Sometimes a lingering report for this command can
> + * get read back instead of the last set report if
> + * this isn't explicitly queried
> + */
> + return steam_recv_report(steam, cmd, 2 + cmd[1]);
> }
>
> static int steam_get_serial(struct steam_device *steam)
> @@ -280,13 +300,32 @@ static void steam_set_lizard_mode(struct
> steam_device *steam, bool enable)
> steam_write_registers(steam,
> STEAM_REG_RPAD_MARGIN, 0x01, /* enable margin
> */
> 0);
> +
> + cancel_delayed_work_sync(&steam->heartbeat);
> } else {
> /* disable esc, enter, cursor */
> steam_send_report_byte(steam,
> STEAM_CMD_CLEAR_MAPPINGS);
> - steam_write_registers(steam,
> - STEAM_REG_RPAD_MODE, 0x07, /* disable mouse
> */
> - STEAM_REG_RPAD_MARGIN, 0x00, /* disable
> margin */
> - 0);
> +
> + if (steam->quirks & STEAM_QUIRK_DECK) {
> + steam_write_registers(steam,
> + STEAM_REG_RPAD_MARGIN, 0x00, /*
> disable margin */
> + STEAM_REG_LPAD_MODE, 0x07, /* disable
> mouse */
> + STEAM_REG_RPAD_MODE, 0x07, /* disable
> mouse */
> + STEAM_REG_LPAD_CLICK_PRESSURE,
> 0xFFFF, /* disable clicky pad */
> + STEAM_REG_RPAD_CLICK_PRESSURE,
> 0xFFFF, /* disable clicky pad */
> + 0);
> + /*
> + * The Steam Deck has a watchdog that
> automatically enables
> + * lizard mode if it doesn't see any traffic
> for too long
> + */
> + schedule_delayed_work(&steam->heartbeat, 5 *
> HZ);
> + } else {
> + steam_write_registers(steam,
> + STEAM_REG_RPAD_MARGIN, 0x00, /*
> disable margin */
> + STEAM_REG_LPAD_MODE, 0x07, /* disable
> mouse */
> + STEAM_REG_RPAD_MODE, 0x07, /* disable
> mouse */
> + 0);
> + }
> }
> }
>
> @@ -413,8 +452,8 @@ static int steam_input_register(struct
> steam_device *steam)
> input->open = steam_input_open;
> input->close = steam_input_close;
>
> - input->name = (steam->quirks & STEAM_QUIRK_WIRELESS) ?
> - "Wireless Steam Controller" :
> + input->name = (steam->quirks & STEAM_QUIRK_WIRELESS) ?
> "Wireless Steam Controller" :
> + (steam->quirks & STEAM_QUIRK_DECK) ? "Steam Deck" :
> "Steam Controller";
> input->phys = hdev->phys;
> input->uniq = steam->serial_no;
> @@ -438,33 +477,69 @@ static int steam_input_register(struct
> steam_device *steam)
> input_set_capability(input, EV_KEY, BTN_SELECT);
> input_set_capability(input, EV_KEY, BTN_MODE);
> input_set_capability(input, EV_KEY, BTN_START);
> - input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
> - input_set_capability(input, EV_KEY, BTN_GEAR_UP);
> input_set_capability(input, EV_KEY, BTN_THUMBR);
> input_set_capability(input, EV_KEY, BTN_THUMBL);
> input_set_capability(input, EV_KEY, BTN_THUMB);
> input_set_capability(input, EV_KEY, BTN_THUMB2);
> + if (steam->quirks & STEAM_QUIRK_DECK) {
> + input_set_capability(input, EV_KEY, BTN_BASE);
> + input_set_capability(input, EV_KEY,
> BTN_TRIGGER_HAPPY1);
> + input_set_capability(input, EV_KEY,
> BTN_TRIGGER_HAPPY2);
> + input_set_capability(input, EV_KEY,
> BTN_TRIGGER_HAPPY3);
> + input_set_capability(input, EV_KEY,
> BTN_TRIGGER_HAPPY4);
> + } else {
> + input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
> + input_set_capability(input, EV_KEY, BTN_GEAR_UP);
> + }
>
> - input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0);
> - input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0);
> input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0);
> input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0);
> - input_set_abs_params(input, ABS_RX, -32767, 32767,
> - STEAM_PAD_FUZZ, 0);
> - input_set_abs_params(input, ABS_RY, -32767, 32767,
> - STEAM_PAD_FUZZ, 0);
> - input_set_abs_params(input, ABS_HAT0X, -32767, 32767,
> - STEAM_PAD_FUZZ, 0);
> - input_set_abs_params(input, ABS_HAT0Y, -32767, 32767,
> - STEAM_PAD_FUZZ, 0);
> - input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION);
> - input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION);
> - input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION);
> - input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION);
> + if (steam->quirks & STEAM_QUIRK_DECK) {
> + input_set_abs_params(input, ABS_HAT2Y, 0, 32767, 0,
> 0);
> + input_set_abs_params(input, ABS_HAT2X, 0, 32767, 0,
> 0);
> +
> + input_set_abs_params(input, ABS_RX, -32767, 32767, 0,
> 0);
> + input_set_abs_params(input, ABS_RY, -32767, 32767, 0,
> 0);
> +
> + input_set_abs_params(input, ABS_HAT0X, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> + input_set_abs_params(input, ABS_HAT0Y, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> + input_set_abs_params(input, ABS_HAT1X, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> + input_set_abs_params(input, ABS_HAT1Y, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> +
> + input_abs_set_res(input, ABS_X,
> STEAM_DECK_JOYSTICK_RESOLUTION);
> + input_abs_set_res(input, ABS_Y,
> STEAM_DECK_JOYSTICK_RESOLUTION);
> + input_abs_set_res(input, ABS_RX,
> STEAM_DECK_JOYSTICK_RESOLUTION);
> + input_abs_set_res(input, ABS_RY,
> STEAM_DECK_JOYSTICK_RESOLUTION);
> + input_abs_set_res(input, ABS_HAT1X,
> STEAM_PAD_RESOLUTION);
> + input_abs_set_res(input, ABS_HAT1Y,
> STEAM_PAD_RESOLUTION);
> + input_abs_set_res(input, ABS_HAT2Y,
> STEAM_DECK_TRIGGER_RESOLUTION);
> + input_abs_set_res(input, ABS_HAT2X,
> STEAM_DECK_TRIGGER_RESOLUTION);
> + } else {
> + input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0);
> + input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0);
> +
> + input_set_abs_params(input, ABS_RX, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> + input_set_abs_params(input, ABS_RY, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> + input_set_abs_params(input, ABS_HAT0X, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> + input_set_abs_params(input, ABS_HAT0Y, -32767, 32767,
> + STEAM_PAD_FUZZ, 0);
> +
> + input_abs_set_res(input, ABS_X,
> STEAM_JOYSTICK_RESOLUTION);
> + input_abs_set_res(input, ABS_Y,
> STEAM_JOYSTICK_RESOLUTION);
> + input_abs_set_res(input, ABS_RX,
> STEAM_PAD_RESOLUTION);
> + input_abs_set_res(input, ABS_RY,
> STEAM_PAD_RESOLUTION);
> + input_abs_set_res(input, ABS_HAT2Y,
> STEAM_TRIGGER_RESOLUTION);
> + input_abs_set_res(input, ABS_HAT2X,
> STEAM_TRIGGER_RESOLUTION);
> + }
> input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION);
> input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION);
> - input_abs_set_res(input, ABS_HAT2Y,
> STEAM_TRIGGER_RESOLUTION);
> - input_abs_set_res(input, ABS_HAT2X,
> STEAM_TRIGGER_RESOLUTION);
>
> ret = input_register_device(input);
> if (ret)
> @@ -612,6 +687,22 @@ static bool steam_is_valve_interface(struct
> hid_device *hdev)
> return !list_empty(&rep_enum->report_list);
> }
>
> +static void steam_lizard_mode_heartbeat(struct work_struct *work)
> +{
> + struct steam_device *steam = container_of(work, struct
> steam_device,
> + heartbeat.wor
> k);
> +
> + mutex_lock(&steam->mutex);
> + if (!steam->client_opened) {
> + steam_send_report_byte(steam,
> STEAM_CMD_CLEAR_MAPPINGS);
> + steam_write_registers(steam,
> + STEAM_REG_RPAD_MODE, 0x07, /* disable mouse
> */
> + 0);
> + schedule_delayed_work(&steam->heartbeat, 5 * HZ);
> + }
> + mutex_unlock(&steam->mutex);
> +}
> +
> static int steam_client_ll_parse(struct hid_device *hdev)
> {
> struct steam_device *steam = hdev->driver_data;
> @@ -750,6 +841,7 @@ static int steam_probe(struct hid_device *hdev,
> steam->quirks = id->driver_data;
> INIT_WORK(&steam->work_connect, steam_work_connect_cb);
> INIT_LIST_HEAD(&steam->list);
> + INIT_DEFERRABLE_WORK(&steam->heartbeat,
> steam_lizard_mode_heartbeat);
>
> steam->client_hdev = steam_create_client_hid(hdev);
> if (IS_ERR(steam->client_hdev)) {
> @@ -805,6 +897,7 @@ static int steam_probe(struct hid_device *hdev,
> hid_destroy_device(steam->client_hdev);
> client_hdev_fail:
> cancel_work_sync(&steam->work_connect);
> + cancel_delayed_work_sync(&steam->heartbeat);
> steam_alloc_fail:
> hid_err(hdev, "%s: failed with error %d\n",
> __func__, ret);
> @@ -823,6 +916,7 @@ static void steam_remove(struct hid_device *hdev)
> hid_destroy_device(steam->client_hdev);
> steam->client_opened = false;
> cancel_work_sync(&steam->work_connect);
> + cancel_delayed_work_sync(&steam->heartbeat);
> if (steam->quirks & STEAM_QUIRK_WIRELESS) {
> hid_info(hdev, "Steam wireless receiver
> disconnected");
> }
> @@ -906,10 +1000,10 @@ static inline s16 steam_le16(u8 *data)
> * 8.5 | BTN_B | button B
> * 8.6 | BTN_X | button X
> * 8.7 | BTN_A | button A
> - * 9.0 | BTN_DPAD_UP | lef-pad up
> - * 9.1 | BTN_DPAD_RIGHT | lef-pad right
> - * 9.2 | BTN_DPAD_LEFT | lef-pad left
> - * 9.3 | BTN_DPAD_DOWN | lef-pad down
> + * 9.0 | BTN_DPAD_UP | left-pad up
> + * 9.1 | BTN_DPAD_RIGHT | left-pad right
> + * 9.2 | BTN_DPAD_LEFT | left-pad left
> + * 9.3 | BTN_DPAD_DOWN | left-pad down
> * 9.4 | BTN_SELECT | menu left
> * 9.5 | BTN_MODE | steam logo
> * 9.6 | BTN_START | menu right
> @@ -993,6 +1087,172 @@ static void steam_do_input_event(struct
> steam_device *steam,
> input_sync(input);
> }
>
> +/*
> + * The size for this message payload is 56.
> + * The known values are:
> + * Offset| Type | Mapped to |Meaning
> + * -------+-------+-----------+--------------------------
> + * 4-7 | u32 | -- | sequence number
> + * 8-15 | u64 | see below | buttons
> + * 16-17 | s16 | ABS_HAT0X | left-pad X value
> + * 18-19 | s16 | ABS_HAT0Y | left-pad Y value
> + * 20-21 | s16 | ABS_HAT1X | right-pad X value
> + * 22-23 | s16 | ABS_HAT1Y | right-pad Y value
> + * 24-25 | s16 | -- | accelerometer X value
> + * 26-27 | s16 | -- | accelerometer Y value
> + * 28-29 | s16 | -- | accelerometer Z value
> + * 30-31 | s16 | -- | gyro X value
> + * 32-33 | s16 | -- | gyro Y value
> + * 34-35 | s16 | -- | gyro Z value
> + * 36-37 | s16 | -- | quaternion W value
> + * 38-39 | s16 | -- | quaternion X value
> + * 40-41 | s16 | -- | quaternion Y value
> + * 42-43 | s16 | -- | quaternion Z value
> + * 44-45 | u16 | ABS_HAT2Y | left trigger (uncalibrated)
> + * 46-47 | u16 | ABS_HAT2X | right trigger (uncalibrated)
> + * 48-49 | s16 | ABS_X | left joystick X
> + * 50-51 | s16 | ABS_Y | left joystick Y
> + * 52-53 | s16 | ABS_RX | right joystick X
> + * 54-55 | s16 | ABS_RY | right joystick Y
> + * 56-57 | u16 | -- | left pad pressure
> + * 58-59 | u16 | -- | right pad pressure
> + *
> + * The buttons are:
> + * Bit | Mapped to | Description
> + * ------+------------+--------------------------------
> + * 8.0 | BTN_TR2 | right trigger fully pressed
> + * 8.1 | BTN_TL2 | left trigger fully pressed
> + * 8.2 | BTN_TR | right shoulder
> + * 8.3 | BTN_TL | left shoulder
> + * 8.4 | BTN_Y | button Y
> + * 8.5 | BTN_B | button B
> + * 8.6 | BTN_X | button X
> + * 8.7 | BTN_A | button A
> + * 9.0 | BTN_DPAD_UP | left-pad up
> + * 9.1 | BTN_DPAD_RIGHT | left-pad right
> + * 9.2 | BTN_DPAD_LEFT | left-pad left
> + * 9.3 | BTN_DPAD_DOWN | left-pad down
> + * 9.4 | BTN_SELECT | menu left
> + * 9.5 | BTN_MODE | steam logo
> + * 9.6 | BTN_START | menu right
> + * 9.7 | BTN_TRIGGER_HAPPY3 | left bottom grip button
> + * 10.0 | BTN_TRIGGER_HAPPY4 | right bottom grip button
> + * 10.1 | BTN_THUMB | left pad pressed
> + * 10.2 | BTN_THUMB2 | right pad pressed
> + * 10.3 | -- | left pad touched
> + * 10.4 | -- | right pad touched
> + * 10.5 | -- | unknown
> + * 10.6 | BTN_THUMBL | left joystick clicked
> + * 10.7 | -- | unknown
> + * 11.0 | -- | unknown
> + * 11.1 | -- | unknown
> + * 11.2 | BTN_THUMBR | right joystick clicked
> + * 11.3 | -- | unknown
> + * 11.4 | -- | unknown
> + * 11.5 | -- | unknown
> + * 11.6 | -- | unknown
> + * 11.7 | -- | unknown
> + * 12.0 | -- | unknown
> + * 12.1 | -- | unknown
> + * 12.2 | -- | unknown
> + * 12.3 | -- | unknown
> + * 12.4 | -- | unknown
> + * 12.5 | -- | unknown
> + * 12.6 | -- | unknown
> + * 12.7 | -- | unknown
> + * 13.0 | -- | unknown
> + * 13.1 | BTN_TRIGGER_HAPPY1 | left top grip button
> + * 13.2 | BTN_TRIGGER_HAPPY2 | right top grip button
> + * 13.3 | -- | unknown
> + * 13.4 | -- | unknown
> + * 13.5 | -- | unknown
> + * 13.6 | -- | left joystick touched
> + * 13.7 | -- | right joystick touched
> + * 14.0 | -- | unknown
> + * 14.1 | -- | unknown
> + * 14.2 | BTN_BASE | quick access button
> + * 14.3 | -- | unknown
> + * 14.4 | -- | unknown
> + * 14.5 | -- | unknown
> + * 14.6 | -- | unknown
> + * 14.7 | -- | unknown
> + * 15.0 | -- | unknown
> + * 15.1 | -- | unknown
> + * 15.2 | -- | unknown
> + * 15.3 | -- | unknown
> + * 15.4 | -- | unknown
> + * 15.5 | -- | unknown
> + * 15.6 | -- | unknown
> + * 15.7 | -- | unknown
> + */
> +static void steam_do_deck_input_event(struct steam_device *steam,
> + struct input_dev *input, u8 *data)
> +{
> + u8 b8, b9, b10, b11, b13, b14;
> + bool lpad_touched, rpad_touched;
> +
> + b8 = data[8];
> + b9 = data[9];
> + b10 = data[10];
> + b11 = data[11];
> + b13 = data[13];
> + b14 = data[14];
> +
> + lpad_touched = b10 & BIT(3);
> + rpad_touched = b10 & BIT(4);
> +
> + if (lpad_touched) {
> + input_report_abs(input, ABS_HAT0X, steam_le16(data +
> 16));
> + input_report_abs(input, ABS_HAT0Y, steam_le16(data +
> 18));
> + } else {
> + input_report_abs(input, ABS_HAT0X, 0);
> + input_report_abs(input, ABS_HAT0Y, 0);
> + }
> +
> + if (rpad_touched) {
> + input_report_abs(input, ABS_HAT1X, steam_le16(data +
> 20));
> + input_report_abs(input, ABS_HAT1Y, steam_le16(data +
> 22));
> + } else {
> + input_report_abs(input, ABS_HAT1X, 0);
> + input_report_abs(input, ABS_HAT1Y, 0);
> + }
> +
> + input_report_abs(input, ABS_X, steam_le16(data + 48));
> + input_report_abs(input, ABS_Y, -steam_le16(data + 50));
> + input_report_abs(input, ABS_RX, steam_le16(data + 52));
> + input_report_abs(input, ABS_RY, -steam_le16(data + 54));
> +
> + input_report_abs(input, ABS_HAT2Y, steam_le16(data + 44));
> + input_report_abs(input, ABS_HAT2X, steam_le16(data + 46));
> +
> + input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0)));
> + input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1)));
> + input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2)));
> + input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3)));
> + input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4)));
> + input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5)));
> + input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6)));
> + input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7)));
> + input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
> + input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
> + input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
> + input_event(input, EV_KEY, BTN_TRIGGER_HAPPY3, !!(b9 &
> BIT(7)));
> + input_event(input, EV_KEY, BTN_TRIGGER_HAPPY4, !!(b10 &
> BIT(0)));
> + input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6)));
> + input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2)));
> + input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0)));
> + input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1)));
> + input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2)));
> + input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3)));
> + input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1)));
> + input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2)));
> + input_event(input, EV_KEY, BTN_TRIGGER_HAPPY1, !!(b13 &
> BIT(1)));
> + input_event(input, EV_KEY, BTN_TRIGGER_HAPPY2, !!(b13 &
> BIT(2)));
> + input_event(input, EV_KEY, BTN_BASE, !!(b14 & BIT(2)));
> +
> + input_sync(input);
> +}
> +
> /*
> * The size for this message payload is 11.
> * The known values are:
> @@ -1052,6 +1312,7 @@ static int steam_raw_event(struct hid_device
> *hdev,
> * 0x01: input data (60 bytes)
> * 0x03: wireless connect/disconnect (1 byte)
> * 0x04: battery status (11 bytes)
> + * 0x09: Steam Deck input data (56 bytes)
> */
>
> if (size != 64 || data[0] != 1 || data[1] != 0)
> @@ -1067,6 +1328,15 @@ static int steam_raw_event(struct hid_device
> *hdev,
> steam_do_input_event(steam, input, data);
> rcu_read_unlock();
> break;
> + case STEAM_EV_DECK_INPUT_DATA:
> + if (steam->client_opened)
> + return 0;
> + rcu_read_lock();
> + input = rcu_dereference(steam->input);
> + if (likely(input))
> + steam_do_deck_input_event(steam, input,
> data);
> + rcu_read_unlock();
> + break;
> case STEAM_EV_CONNECT:
> /*
> * The payload of this event is a single byte:
> @@ -1141,6 +1411,11 @@ static const struct hid_device_id
> steam_controllers[] = {
> USB_DEVICE_ID_STEAM_CONTROLLER_WIRELESS),
> .driver_data = STEAM_QUIRK_WIRELESS
> },
> + { /* Steam Deck */
> + HID_USB_DEVICE(USB_VENDOR_ID_VALVE,
> + USB_DEVICE_ID_STEAM_DECK),
> + .driver_data = STEAM_QUIRK_DECK
> + },
> {}
> };
>
^ permalink raw reply
* [PATCH v3] HID: Recognize sensors with application collections
From: Aditya Garg @ 2023-01-11 10:07 UTC (permalink / raw)
To: Jiri Kosina, jkosina@suse.cz, benjamin.tissoires@redhat.com,
jic23@kernel.org, srinivas.pandruvada@linux.intel.com,
linux-input@vger.kernel.org, LKML, linux-iio@vger.kernel.org
Cc: orlandoch.dev@gmail.com, ronald@innovation.ch
In-Reply-To: <EFCEA45A-C6F4-477A-B011-9C9E6E61E488@live.com>
From: Ronald Tschalär <ronald@innovation.ch>
According to HUTRR39 logical sensor devices may be nested inside
physical collections or may be specified in multiple top-level
application collections (see page 59, strategies 1 and 2). However,
the current code was only recognizing those with physical collections.
This issue turned up in the T2 MacBook Pros which define the ALS in
a top-level application collection.
Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
V2 :- Add missing signed-off-by
V3 :- Avoid using language extensions
drivers/hid/hid-core.c | 3 ++-
drivers/hid/hid-sensor-hub.c | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index bd47628da..8ff08e6c2 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -804,7 +804,8 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
int i;
if (((parser->global.usage_page << 16) == HID_UP_SENSOR) &&
- type == HID_COLLECTION_PHYSICAL)
+ (type == HID_COLLECTION_PHYSICAL ||
+ type == HID_COLLECTION_APPLICATION))
hid->group = HID_GROUP_SENSOR_HUB;
if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 6abd3e2a9..83237b86c 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -397,7 +397,8 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
for (i = 0; i < report->maxfield; ++i) {
field = report->field[i];
if (field->maxusage) {
- if (field->physical == usage_id &&
+ if ((field->physical == usage_id ||
+ field->application == usage_id) &&
(field->logical == attr_usage_id ||
field->usage[0].hid ==
attr_usage_id) &&
@@ -506,7 +507,8 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
collection->usage);
callback = sensor_hub_get_callback(hdev,
- report->field[i]->physical,
+ report->field[i]->physical ? report->field[i]->physical :
+ report->field[i]->application,
report->field[i]->usage[0].collection_index,
&hsdev, &priv);
if (!callback) {
--
2.34.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox