aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2023-08-28i3c: master: Fix SETDASA processAniket1-1/+5
When a I3C DT node has a static_addr and an init_dyn_addr,the init_dyn_addr is reserved in i3c_master_bus_init() and then the static_addr is reserved in i3c_master_early_i3c_dev_add(). But if the dynamic address is same as static then above procedure would fail. Add a check to pass i3c_bus_get_addr_slot_status() when static and dynamic address are equal. Signed-off-by: Aniket <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-28i3c: master: svc: Describe member 'saved_regs'Miquel Raynal1-0/+1
The 'saved_regs' member of the 'svc_i3c_master' structure is not described in the kernel doc, which produces the following warning: Function parameter or member 'saved_regs' not described in 'svc_i3c_master' Add the missing line in the kernel documentation of the parent structure. Fixes: 1c5ee2a77b1b ("i3c: master: svc: fix i3c suspend/resume issue") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-28rtc: twl: add NVRAM supportLadislav Michl1-0/+37
Export SRAM using nvmem. Signed-off-by: Ladislav Michl <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Link: https://lore.kernel.org/r/ZDf7qZTiml0ijD2g@lenoch Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-28rtc: pcf85363: Allow to wake up system without IRQMike Looijmans1-9/+21
When wakeup-source is set in the devicetree, set up the device for using the output as interrupt instead of clock. This is similar to how other RTC devices handle this. This allows the clock chip to turn on the board when wired to do so in hardware. Signed-off-by: Mike Looijmans <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-28rtc: m48t86: add DT support for m48t86Nikita Shubin1-0/+8
Add OF ID match table. Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Nikita Shubin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: pcf2127: remove useless checkAlexandre Belloni1-9/+0
This check is only useful when introducing support for a new RTC in the driver. Cut down the number of strings in th driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: rzn1: Report maximum alarm limit to rtc coreGuenter Roeck1-1/+2
RZN1 only supports alarms up to one week in the future. Report the limit to the RTC core and use the reported limit to validate the requested alarm time when setting it. Cc: Brian Norris <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: ds1305: Report maximum alarm limit to rtc coreGuenter Roeck1-2/+3
DS1305 only supports alarms up to 24 hours in the future. Report the limit to the RTC core, and use the reported limit to validate the requested alarm time when setting it. If the alarm is too large when trying to set an alarm, return -ERANGE instead of -EDOM to align with error codes returned by other rtc drivers. Cc: Brian Norris <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: tps6586x: Report maximum alarm limit to rtc coreGuenter Roeck1-0/+1
tps6586x only supports alarms up to 16,383 seconds in the future. Report the limit to the RTC core. Cc: Brian Norris <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: cmos: Report supported alarm limit to rtc infrastructureGuenter Roeck1-0/+11
The alarm window supported by the cmos RTC depends on the chip and its configuration. Report the limit to the RTC core. Cc: Brian Norris <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: cros-ec: Detect and report supported alarm window sizeGuenter Roeck1-15/+23
The RTC on some older Chromebooks can only handle alarms less than 24 hours in the future. The only way to find out is to try to set an alarm further in the future. If that fails, assume that the RTC connected to the EC can only handle less than 24 hours of alarm window, and report that value to the RTC core. After that change, it is no longer necessary to limit the alarm time when setting it. Report any excessive alarms to the caller instead. Cc: Brian Norris <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27rtc: isl1208: Fix incorrect logic in isl1208_set_xtoscb()Biju Das1-2/+1
The XTOSCB bit is not bit 0, but xtosb_val is either 0 or 1. If it is 1, test will never succeed. Fix this issue by using double negation. While at it, remove unnecessary blank line from probe(). Reported-by: Pavel Machek <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Biju Das <[email protected]> Reviewed-by: Pavel Machek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-08-27Merge tag 'scsi-fixes' of ↵Linus Torvalds4-53/+6
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small driver fixes and one larger unused function set removal in the raid class (so no external impact)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: snic: Fix double free in snic_tgt_create() scsi: core: raid_class: Remove raid_component_add() scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5 scsi: ufs: mcq: Fix the search/wrap around logic
2023-08-27Merge tag 'usb-serial-6.6-rc1' of ↵Greg Kroah-Hartman2-1/+95
https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 6.6-rc1 Here are the USB-serial updates for 6.6-rc1, including: - support for the RS485 mode of XR devices - new modem device ids All have been in linux-next with no reported issues. * tag 'usb-serial-6.6-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add FOXCONN T99W368/T99W373 product USB: serial: option: add Quectel EM05G variant (0x030e) USB: serial: xr: add TIOCGRS485 and TIOCSRS485 ioctls
2023-08-27tty: n_tty: deduplicate copy code in n_tty_receive_buf_real_raw()Jiri Slaby (SUSE)1-13/+12
The code is duplicated to perform the copy twice -- to handle buffer wrap-around. Instead of the duplication, roll this into the loop. (And add some blank lines around to have the code a bit more readable.) Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: extract ECHO_OP processing to a separate functionJiri Slaby (SUSE)1-96/+98
__process_echoes() contains ECHO_OPs processing. It is stuffed in a while loop and the whole function is barely readable. Separate it to a new function: n_tty_process_echo_ops(). Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: unify counts to size_tJiri Slaby (SUSE)1-17/+15
Some count types are already 'size_t' for a long time. Some were switched to 'size_t' recently. Unify the rest with those now. This allows for some min_t()s to become min()s. And make one min() an explicit min_t() as we are comparing signed 'room' to unsigned 'count'. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: use u8 for chars and flagsJiri Slaby (SUSE)1-36/+36
Unify with the tty layer and use u8 for both chars and flags. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: simplify chars_in_buffer()Jiri Slaby (SUSE)1-6/+2
The 'if' in chars_in_buffer() is misleadingly inverted. And since the only difference is the head used for computation, cache the head using ternary operator. And use that in return directly. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: remove unsigned char casts from character constantsJiri Slaby (SUSE)1-3/+3
We compile with -funsigned-char, so all character constants are already unsigned chars. Therefore, remove superfluous casts. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: move newline handling to a separate functionJiri Slaby (SUSE)1-8/+19
Currently, n_tty handles the newline in a label in n_tty_receive_char_canon(). That is invoked from two more places. Split this code to a separate function and avoid the label in this case. This makes the code flow more understandable. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: move canon handling to a separate functionJiri Slaby (SUSE)1-71/+87
n_tty_receive_char_special() is already complicated enough. Split the canon handling to a separate function: n_tty_receive_char_canon(). Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: use MASK() for masking out size bitsJiri Slaby (SUSE)1-12/+11
In n_tty, there is already a macro to mask out top bits from ring buffer counters. It is MASK() added some time ago. So use it more in the code to make it more readable. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: make n_tty_data::num_overrun unsignedJiri Slaby (SUSE)1-2/+2
n_tty_data::num_overrun is unlikely to overflow in a second. But make it explicitly unsigned to avoid printing negative values. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: use time_is_before_jiffies() in n_tty_receive_overrun()Jiri Slaby (SUSE)1-2/+1
The jiffies tests in n_tty_receive_overrun() are simplified ratelimiting (without locking). We could use struct ratelimit_state and the helpers, but to me, it occurs to be too complex for this use case. But the code currently tests both if the time passed (the first time_after()) and if jiffies wrapped around (the second time_after()). time_is_before_jiffies() takes care of both, provided overrun_time is initialized at the allocation time. So switch to time_is_before_jiffies(), the same what ratelimiting does. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: use 'num' for writes' countsJiri Slaby (SUSE)1-9/+8
We have a separate misnomer 'c' to hold the retuned value from tty->ops->write(). Instead, use 'num' already defined on another place (and already properly typed). Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: use output character directlyJiri Slaby (SUSE)1-2/+1
There is no point to use a local variable to store the character when we can pass it directly. This assignment comes from era when we used to do get_user(c, b). We no longer need this, so fix this. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27tty: n_tty: make flow of n_tty_receive_buf_common() a boolJiri Slaby (SUSE)1-3/+3
The 'flow' parameter of n_tty_receive_buf_common() is meant to be a boolean value. So use bool and alter call sites accordingly. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27Revert "tty: serial: meson: Add a earlycon for the T7 SoC"Lucas Tanure1-2/+0
This reverts commit 6a4197f9763325043abf7690a21124a9facbf52e New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need a OF_EARLYCON_DECLARE. Fixes: 6a4197f97633 ("tty: serial: meson: Add a earlycon for the T7 SoC") Signed-off-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-27parisc: lasi: Initialize LASI driver via arch_initcall()Helge Deller2-12/+8
Move initialization code for LASI out of the GSC driver. Since ASP and WAX have been moved in previous commits, the GSC driver is now just a driver which provides library functions for LASI, ASP and WAX and as such doesn't need an own initialization function any longer. Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: asp: Initialize asp driver via arch_initcall()Helge Deller2-4/+9
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: wax: Initialize wax driver via arch_initcall()Helge Deller2-7/+9
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: iosapic: Convert I/O Sapic driver to use arch_initcall()Helge Deller1-4/+4
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: sba_iommu: Convert SBA IOMMU driver to use arch_initcall()Helge Deller1-2/+3
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: led: Move register_led_regions() to late_initcall()Helge Deller1-1/+3
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: lba: Convert LBA PCI bus driver to use arch_initcall()Helge Deller1-2/+3
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: gsc: Convert GSC bus driver to use arch_initcall()Helge Deller1-1/+3
This conversion includes LASI, ASP and WAX drivers for now. Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: ccio: Convert CCIO driver to use arch_initcall()Helge Deller1-11/+3
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: eisa: Convert HP EISA bus driver to use arch_initcall()Helge Deller1-2/+3
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: hppb: Convert HP PB bus driver to use arch_initcall()Helge Deller1-3/+4
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: dino: Convert dino PCI bus driver to use arch_initcall()Helge Deller1-3/+3
Signed-off-by: Helge Deller <[email protected]>
2023-08-27parisc: Makefile: Adjust order in which drivers should be loadedHelge Deller1-7/+9
This is the order in which the drivers are initialized in setup.c. The order is important when the drivers are convertet to use the initcall_*() startup framework. Signed-off-by: Helge Deller <[email protected]>
2023-08-27net: ti: icssg-prueth: am65x SR2.0 add 10M full duplex supportGrygorii Strashko5-2/+62
For AM65x SR2.0 it's required to enable IEP1 in raw 64bit mode which is used by PRU FW to monitor the link and apply w/a for 10M link issue. Note. No public errata available yet. Without this w/a the PRU FW will stuck if link state changes under TX traffic pressure. Hence, add support for 10M full duplex for AM65x SR2.0: - add new IEP API to enable IEP, but without PTP support - add pdata quirk_10m_link_issue to enable 10M link issue w/a. Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: MD Danish Anwar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27net: ti: icssg-prueth: add packet timestamping and ptp supportRoger Quadros5-6/+467
Add packet timestamping TS and PTP PHC clock support. For AM65x and AM64x: - IEP1 is not used - IEP0 is configured in shadow mode with 1ms cycle and shared between Linux and FW. It provides time and TS in number cycles, so special conversation in ns is required. - IEP0 shared between PRUeth ports. - IEP0 supports PPS, periodic output. - IEP0 settime() and enabling PPS required FW interraction. - RX TS provided with each packet in CPPI5 descriptor. - TX TS returned through separate ICSSG hw queues for each port. TX TS readiness is signaled by INTC IRQ. Only one packet at time can be requested for TX TS. Signed-off-by: Roger Quadros <[email protected]> Co-developed-by: Grygorii Strashko <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: MD Danish Anwar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27net: ti: icss-iep: Add IEP driverRoger Quadros4-0/+989
Add a driver for Industrial Ethernet Peripheral (IEP) block of PRUSS to support timestamping of ethernet packets and thus support PTP and PPS for PRU ethernet ports. Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: MD Danish Anwar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27sfc: extend pedit add action to handle decrement ipv6 hop limitPieter Jansen van Vuuren1-0/+25
Extend the pedit add actions to handle this case for ipv6. Similar to ipv4 dec ttl, decrementing ipv6 hop limit can be achieved by adding 0xff to the hop limit field. Co-developed-by: Edward Cree <[email protected]> Signed-off-by: Edward Cree <[email protected]> Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27sfc: introduce pedit add actions on the ipv4 ttl fieldPieter Jansen van Vuuren1-0/+46
Introduce pedit add actions and use it to achieve decrement ttl offload. Decrement ttl can be achieved by adding 0xff to the ttl field. Co-developed-by: Edward Cree <[email protected]> Signed-off-by: Edward Cree <[email protected]> Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27sfc: add decrement ipv6 hop limit by offloading set hop limit actionsPieter Jansen van Vuuren1-0/+59
Offload pedit set ipv6 hop limit, where the hop limit has already been matched and the new value is one less, by translating it to a decrement. Co-developed-by: Edward Cree <[email protected]> Signed-off-by: Edward Cree <[email protected]> Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27sfc: add decrement ttl by offloading set ipv4 ttl actionsPieter Jansen van Vuuren3-4/+79
Offload pedit set ipv4 ttl field, where the ttl field has already been matched and the new value is one less, by translating it to a decrement. Co-developed-by: Edward Cree <[email protected]> Signed-off-by: Edward Cree <[email protected]> Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-27sfc: add mac source and destination pedit action offloadPieter Jansen van Vuuren1-2/+207
Introduce the first pedit set offload functionality for the sfc driver. In addition to this, add offload functionality for both mac source and destination pedit set actions. Co-developed-by: Edward Cree <[email protected]> Signed-off-by: Edward Cree <[email protected]> Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: David S. Miller <[email protected]>