15 May, 2019

1 commit

  • Pull MFD updates from Lee Jones:
    "Core Framework:
    - Document (kerneldoc) core mfd_add_devices() API

    New Drivers:
    - Altera SOCFPGA System Manager
    - Maxim MAX77650/77651 PMIC
    - Maxim MAX77663 PMIC
    - ST Multi-Function eXpander (STMFX)

    New Device Support:
    - LEDs support in Intel Cherry Trail Whiskey Cove PMIC
    - RTC support in SAMSUNG Electronics S2MPA01 PMIC
    - SAM9X60 support in Atmel HLCDC (High-end LCD Controller)
    - USB X-Powers AXP 8xx PMICs
    - Integrated Sensor Hub (ISH) in ChromeOS EC
    - USB PD Logger in ChromeOS EC
    - AXP223 in X-Powers AXP series PMICs
    - Power Supply in X-Powers AXP 803 PMICs
    - Comet Lake in Intel Low Power Subsystem
    - Fingerprint MCU in ChromeOS EC
    - Touchpad MCU in ChromeOS EC
    - Move TI LM3532 support to LED

    New Functionality:
    - max77650, max77620: Add/extend DT support
    - max77620 power-off
    - syscon clocking
    - croc_ec host sleep event

    Fix-ups:
    - Trivial; Formatting, spelling, etc; Kconfig, sec-core, ab8500-debugfs
    - Remove unused functionality; rk808, da9063-*
    - SPDX conversion; da9063-*, atmel-*,
    - Adapt/add new register definitions; cs47l35-tables, cs47l90-tables, imx6q-iomuxc-gpr
    - Fix-up DT bindings; ti-lmu, cirrus,lochnagar
    - Simply obtaining driver data; ssbi, t7l66xb, tc6387xb, tc6393xb

    Bug Fixes:
    - Fix incorrect defined values; max77620, da9063
    - Fix device initialisation; twl6040
    - Reset device on init; intel-lpss
    - Fix build warnings when !OF; sun6i-prcm
    - Register OF match tables; tps65912-spi
    - Fix DMI matching; intel_quark_i2c_gpio"

    * tag 'mfd-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (65 commits)
    mfd: Use dev_get_drvdata() directly
    mfd: cros_ec: Instantiate properly CrOS Touchpad MCU device
    mfd: cros_ec: Instantiate properly CrOS FP MCU device
    mfd: cros_ec: Update the EC feature codes
    mfd: intel-lpss: Add Intel Comet Lake PCI IDs
    mfd: lochnagar: Add links to binding docs for sound and hwmon
    mfd: ab8500-debugfs: Fix a typo ("deubgfs")
    mfd: imx6sx: Add MQS register definition for iomuxc gpr
    dt-bindings: mfd: LMU: Fix lm3632 dt binding example
    mfd: intel_quark_i2c_gpio: Adjust IOT2000 matching
    mfd: da9063: Fix OTP control register names to match datasheets for DA9063/63L
    mfd: tps65912-spi: Add missing of table registration
    mfd: axp20x: Add USB power supply mfd cell to AXP803
    mfd: sun6i-prcm: Fix build warning for non-OF configurations
    mfd: intel-lpss: Set the device in reset state when init
    platform/chrome: Add support for v1 of host sleep event
    mfd: cros_ec: Add host_sleep_event_v1 command
    mfd: cros_ec: Instantiate the CrOS USB PD logger driver
    mfd: cs47l90: Make DAC_AEC_CONTROL_2 readable
    mfd: cs47l35: Make DAC_AEC_CONTROL_2 readable
    ...

    Linus Torvalds
     

14 May, 2019

1 commit


08 May, 2019

2 commits

  • This adds basic support for LEDs for the max77650 PMIC. The device has
    three current sinks for driving LEDs.

    Signed-off-by: Bartosz Golaszewski
    Acked-by: Jacek Anaszewski
    Acked-by: Pavel Machek
    Signed-off-by: Lee Jones

    Bartosz Golaszewski
     
  • …anaszewski/linux-leds

    Pull LED updates from Jacek Anaszewski:
    "LED core fixes and improvements:

    - avoid races with workqueue
    - Kconfig: pedantic cleanup
    - small fixes for Flash class description

    leds-lt3593:

    - remove unneeded assignment in lt3593_led_probe
    - drop pdata handling code

    leds-blinkm:

    - clean up double assignment to data->i2c_addr

    leds-pca955x, leds-pca963x:

    - revert ACPI support, as it turned out that there is no evidence
    of officially registered ACPI IDs for these devices.
    - make use of device property API

    leds-as3645a:

    - switch to fwnode property API

    LED related addition to ACPI documentation:

    - document how to refer to LEDs from remote nodes

    LED related fix to ALSA line6/toneport driver:

    - avoid polluting led_* namespace

    And lm3532 driver relocation from MFD to LED subsystem, accompanied by
    various improvements and optimizations; it entails also a change in
    omap4-droid4-xt894.dts:

    - leds: lm3532: Introduce the lm3532 LED driver
    - mfd: ti-lmu: Remove LM3532 backlight driver references
    - ARM: dts: omap4-droid4: Update backlight dt properties
    - dt: lm3532: Add lm3532 dt doc and update ti_lmu doc"

    * tag 'leds-for-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
    leds: avoid races with workqueue
    ALSA: line6: Avoid polluting led_* namespace
    leds: lm3532: Introduce the lm3532 LED driver
    mfd: ti-lmu: Remove LM3532 backlight driver references
    ARM: dts: omap4-droid4: Update backlight dt properties
    dt: lm3532: Add lm3532 dt doc and update ti_lmu doc
    leds: Small fixes for Flash class description
    leds: blinkm: clean up double assignment to data->i2c_addr
    leds: pca963x: Make use of device property API
    leds: pca955x: Make use of device property API
    leds: lt3593: Remove unneeded assignment in lt3593_led_probe
    leds: lt3593: drop pdata handling code
    leds: pca955x: Revert "Add ACPI support"
    leds: pca963x: Revert "Add ACPI support"
    drivers: leds: Kconfig: pedantic cleanups
    ACPI: Document how to refer to LEDs from remote nodes
    leds: as3645a: Switch to fwnode property API

    Linus Torvalds
     

06 May, 2019

1 commit

  • Using scripts/coccinelle/api/stream_open.cocci added in 10dce8af3422
    ("fs: stream_open - opener for stream-like files so that read and write
    can run simultaneously without deadlock"), search and convert to
    stream_open all in-kernel nonseekable_open users for which read and
    write actually do not depend on ppos and where there is no other methods
    in file_operations which assume @offset access.

    I've verified each generated change manually - that it is correct to convert -
    and each other nonseekable_open instance left - that it is either not correct
    to convert there, or that it is not converted due to current stream_open.cocci
    limitations. The script also does not convert files that should be valid to
    convert, but that currently have .llseek = noop_llseek or generic_file_llseek
    for unknown reason despite file being opened with nonseekable_open (e.g.
    drivers/input/mousedev.c)

    Among cases converted 14 were potentially vulnerable to read vs write deadlock
    (see details in 10dce8af3422):

    drivers/char/pcmcia/cm4000_cs.c:1685:7-23: ERROR: cm4000_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/gnss/core.c:45:1-17: ERROR: gnss_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/hid/uhid.c:635:1-17: ERROR: uhid_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/infiniband/core/user_mad.c:988:1-17: ERROR: umad_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/input/evdev.c:527:1-17: ERROR: evdev_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/input/misc/uinput.c:401:1-17: ERROR: uinput_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/isdn/capi/capi.c:963:8-24: ERROR: capi_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/leds/uleds.c:77:1-17: ERROR: uleds_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/media/rc/lirc_dev.c:198:1-17: ERROR: lirc_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/s390/char/fs3270.c:488:1-17: ERROR: fs3270_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/usb/misc/ldusb.c:310:1-17: ERROR: ld_usb_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/xen/evtchn.c:667:8-24: ERROR: evtchn_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    net/batman-adv/icmp_socket.c:80:1-17: ERROR: batadv_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    net/rfkill/core.c:1146:8-24: ERROR: rfkill_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.

    and the rest were just safe to convert to stream_open because their read and
    write do not use ppos at all and corresponding file_operations do not
    have methods that assume @offset file access(*):

    arch/powerpc/platforms/52xx/mpc52xx_gpt.c:631:8-24: WARNING: mpc52xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_ibox_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_ibox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_mbox_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_mbox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_wbox_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_wbox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/um/drivers/harddog_kern.c:88:8-24: WARNING: harddog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/x86/kernel/cpu/microcode/core.c:430:33-49: WARNING: microcode_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/ds1620.c:215:8-24: WARNING: ds1620_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/dtlk.c:301:1-17: WARNING: dtlk_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/ipmi/ipmi_watchdog.c:840:9-25: WARNING: ipmi_wdog_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/pcmcia/scr24x_cs.c:95:8-24: WARNING: scr24x_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/tb0219.c:246:9-25: WARNING: tb0219_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/firewire/nosy.c:306:8-24: WARNING: nosy_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/hwmon/fschmd.c:840:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/hwmon/w83793.c:1344:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/infiniband/core/ucma.c:1747:8-24: WARNING: ucma_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/infiniband/core/ucm.c:1178:8-24: WARNING: ucm_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/infiniband/core/uverbs_main.c:1086:8-24: WARNING: uverbs_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/input/joydev.c:282:1-17: WARNING: joydev_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/pci/switch/switchtec.c:393:1-17: WARNING: switchtec_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/platform/chrome/cros_ec_debugfs.c:135:8-24: WARNING: cros_ec_console_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/rtc/rtc-ds1374.c:470:9-25: WARNING: ds1374_wdt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/rtc/rtc-m41t80.c:805:9-25: WARNING: wdt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/s390/char/tape_char.c:293:2-18: WARNING: tape_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/s390/char/zcore.c:194:8-24: WARNING: zcore_reipl_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/s390/crypto/zcrypt_api.c:528:8-24: WARNING: zcrypt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/spi/spidev.c:594:1-17: WARNING: spidev_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/staging/pi433/pi433_if.c:974:1-17: WARNING: pi433_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/acquirewdt.c:203:8-24: WARNING: acq_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/advantechwdt.c:202:8-24: WARNING: advwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/alim1535_wdt.c:252:8-24: WARNING: ali_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/alim7101_wdt.c:217:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ar7_wdt.c:166:8-24: WARNING: ar7_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/at91rm9200_wdt.c:113:8-24: WARNING: at91wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ath79_wdt.c:135:8-24: WARNING: ath79_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/bcm63xx_wdt.c:119:8-24: WARNING: bcm63xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/cpu5wdt.c:143:8-24: WARNING: cpu5wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/cpwd.c:397:8-24: WARNING: cpwd_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/eurotechwdt.c:319:8-24: WARNING: eurwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/f71808e_wdt.c:528:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/gef_wdt.c:232:8-24: WARNING: gef_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/geodewdt.c:95:8-24: WARNING: geodewdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ib700wdt.c:241:8-24: WARNING: ibwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ibmasr.c:326:8-24: WARNING: asr_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/indydog.c:80:8-24: WARNING: indydog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/intel_scu_watchdog.c:307:8-24: WARNING: intel_scu_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/iop_wdt.c:104:8-24: WARNING: iop_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/it8712f_wdt.c:330:8-24: WARNING: it8712f_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ixp4xx_wdt.c:68:8-24: WARNING: ixp4xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ks8695_wdt.c:145:8-24: WARNING: ks8695wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/m54xx_wdt.c:88:8-24: WARNING: m54xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/machzwd.c:336:8-24: WARNING: zf_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/mixcomwd.c:153:8-24: WARNING: mixcomwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/mtx-1_wdt.c:121:8-24: WARNING: mtx1_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/mv64x60_wdt.c:136:8-24: WARNING: mv64x60_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/nuc900_wdt.c:134:8-24: WARNING: nuc900wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/nv_tco.c:164:8-24: WARNING: nv_tco_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pc87413_wdt.c:289:8-24: WARNING: pc87413_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd.c:698:8-24: WARNING: pcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd.c:737:8-24: WARNING: pcwd_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_pci.c:581:8-24: WARNING: pcipcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_pci.c:623:8-24: WARNING: pcipcwd_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_usb.c:488:8-24: WARNING: usb_pcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_usb.c:527:8-24: WARNING: usb_pcwd_temperature_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pika_wdt.c:121:8-24: WARNING: pikawdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pnx833x_wdt.c:119:8-24: WARNING: pnx833x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/rc32434_wdt.c:153:8-24: WARNING: rc32434_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/rdc321x_wdt.c:145:8-24: WARNING: rdc321x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/riowd.c:79:1-17: WARNING: riowd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sa1100_wdt.c:62:8-24: WARNING: sa1100dog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc60xxwdt.c:211:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc7240_wdt.c:139:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc8360.c:274:8-24: WARNING: sbc8360_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc_epx_c3.c:81:8-24: WARNING: epx_c3_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc_fitpc2_wdt.c:78:8-24: WARNING: fitpc2_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sb_wdog.c:108:1-17: WARNING: sbwdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sc1200wdt.c:181:8-24: WARNING: sc1200wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sc520_wdt.c:261:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sch311x_wdt.c:319:8-24: WARNING: sch311x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/scx200_wdt.c:105:8-24: WARNING: scx200_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/smsc37b787_wdt.c:369:8-24: WARNING: wb_smsc_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/w83877f_wdt.c:227:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/w83977f_wdt.c:301:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wafer5823wdt.c:200:8-24: WARNING: wafwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/watchdog_dev.c:828:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdrtas.c:379:8-24: WARNING: wdrtas_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdrtas.c:445:8-24: WARNING: wdrtas_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt285.c:104:1-17: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt977.c:276:8-24: WARNING: wdt977_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt.c:424:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt.c:484:8-24: WARNING: wdt_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt_pci.c:464:8-24: WARNING: wdtpci_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt_pci.c:527:8-24: WARNING: wdtpci_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    net/batman-adv/log.c:105:1-17: WARNING: batadv_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/control.c:57:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/rawmidi.c:385:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/seq/seq_clientmgr.c:310:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/timer.c:1428:7-23: WARNING: snd_timer_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.

    One can also recheck/review the patch via generating it with explanation comments included via

    $ make coccicheck MODE=patch COCCI=scripts/coccinelle/api/stream_open.cocci SPFLAGS="-D explain"

    (*) This second group also contains cases with read/write deadlocks that
    stream_open.cocci don't yet detect, but which are still valid to convert to
    stream_open since ppos is not used. For example drivers/pci/switch/switchtec.c
    calls wait_for_completion_interruptible() in its .read, but stream_open.cocci
    currently detects only "wait_event*" as blocking.

    Cc: Michael Kerrisk
    Cc: Yongzhi Pan
    Cc: Jonathan Corbet
    Cc: David Vrabel
    Cc: Juergen Gross
    Cc: Miklos Szeredi
    Cc: Tejun Heo
    Cc: Kirill Tkhai
    Cc: Arnd Bergmann
    Cc: Christoph Hellwig
    Cc: Greg Kroah-Hartman
    Cc: Julia Lawall
    Cc: Nikolaus Rath
    Cc: Han-Wen Nienhuys
    Cc: Anatolij Gustschin
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Anton Ivanov
    Cc: Borislav Petkov
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "James R. Van Zandt"
    Cc: Corey Minyard
    Cc: Harald Welte
    Acked-by: Lubomir Rintel [scr24x_cs]
    Cc: Stefan Richter
    Cc: Johan Hovold
    Cc: David Herrmann
    Cc: Jiri Kosina
    Cc: Benjamin Tissoires
    Cc: Jean Delvare
    Acked-by: Guenter Roeck [watchdog/* hwmon/*]
    Cc: Rudolf Marek
    Cc: Dmitry Torokhov
    Cc: Karsten Keil
    Cc: Jacek Anaszewski
    Cc: Pavel Machek
    Cc: Mauro Carvalho Chehab
    Cc: Kurt Schwemmer
    Acked-by: Logan Gunthorpe [drivers/pci/switch/switchtec]
    Acked-by: Bjorn Helgaas [drivers/pci/switch/switchtec]
    Cc: Benson Leung
    Acked-by: Enric Balletbo i Serra [platform/chrome]
    Cc: Alessandro Zummo
    Acked-by: Alexandre Belloni [rtc/*]
    Cc: Mark Brown
    Cc: Wim Van Sebroeck
    Cc: Florian Fainelli
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: Wan ZongShun
    Cc: Zwane Mwaikambo
    Cc: Marek Lindner
    Cc: Simon Wunderlich
    Cc: Antonio Quartulli
    Cc: "David S. Miller"
    Cc: Johannes Berg
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Kirill Smelkov

    Kirill Smelkov
     

03 May, 2019

1 commit

  • There are races between "main" thread and workqueue. They manifest
    themselves on Thinkpad X60:

    This should result in LED blinking, but it turns it off instead:

    root@amd:/data/pavel# cd /sys/class/leds/tpacpi\:\:power
    root@amd:/sys/class/leds/tpacpi::power# echo timer > trigger
    root@amd:/sys/class/leds/tpacpi::power# echo timer > trigger

    It should be possible to transition from blinking to solid on by echo
    0 > brightness; echo 1 > brightness... but that does not work, either,
    if done too quickly.

    Synchronization of the workqueue fixes both.

    Fixes: 1afcadfcd184 ("leds: core: Use set_brightness_work for the blocking op")
    Signed-off-by: Pavel Machek
    Signed-off-by: Jacek Anaszewski

    Pavel Machek
     

08 Apr, 2019

2 commits

  • Merge immutable branch between LEDs, MFD and OMAP Device Tree due to
    LM3532 backlight driver improvements and relocation.

    * tag 'lm3532-driver-improvements':
    leds: lm3532: Introduce the lm3532 LED driver
    mfd: ti-lmu: Remove LM3532 backlight driver references
    ARM: dts: omap4-droid4: Update backlight dt properties
    dt: lm3532: Add lm3532 dt doc and update ti_lmu doc

    Jacek Anaszewski
     
  • Introduce the Texas Instruments LM3532 White LED driver.
    The driver supports ALS configurability or manual brightness
    control.

    The driver also supports associating LED strings with specific
    control banks in a group or as individually controlled strings.

    Signed-off-by: Dan Murphy
    Tested-by: Tony Lindgren
    Signed-off-by: Jacek Anaszewski

    Dan Murphy
     

04 Apr, 2019

1 commit


03 Apr, 2019

1 commit


01 Apr, 2019

7 commits


31 Mar, 2019

2 commits

  • If userspace doesn't end the input with a newline (which can easily
    happen if the write happens from a C program that does write(fd,
    iface, strlen(iface))), we may end up including garbage from a
    previous, longer value in the device_name. For example

    # cat device_name

    # printf 'eth12' > device_name
    # cat device_name
    eth12
    # printf 'eth3' > device_name
    # cat device_name
    eth32

    I highly doubt anybody is relying on this behaviour, so switch to
    simply copying the bytes (we've already checked that size is <
    IFNAMSIZ) and unconditionally zero-terminate it; of course, we also
    still have to strip a trailing newline.

    This is also preparation for future patches.

    Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger")
    Signed-off-by: Rasmus Villemoes
    Acked-by: Pavel Machek
    Signed-off-by: Jacek Anaszewski

    Rasmus Villemoes
     
  • In case of_match_device cannot find a match, return -EINVAL to avoid
    NULL pointer dereference.

    Fixes: fa4191a609f2 ("leds: pca9532: Add device tree support")
    Signed-off-by: Kangjie Lu
    Signed-off-by: Jacek Anaszewski

    Kangjie Lu
     

27 Mar, 2019

1 commit

  • Renaming a netdev-trigger-tracked interface was resulting in an
    unbalanced dev_hold().

    Example:
    > iw phy phy0 interface add foo type __ap
    > echo netdev > trigger
    > echo foo > device_name
    > ip link set foo name bar
    > iw dev bar del
    [ 237.355366] unregister_netdevice: waiting for bar to become free. Usage count = 1
    [ 247.435362] unregister_netdevice: waiting for bar to become free. Usage count = 1
    [ 257.545366] unregister_netdevice: waiting for bar to become free. Usage count = 1

    Above problem was caused by trigger checking a dev->name which obviously
    changes after renaming an interface. It meant missing all further events
    including the NETDEV_UNREGISTER which is required for calling dev_put().

    This change fixes that by:
    1) Comparing device struct *address* for notification-filtering purposes
    2) Dropping unneeded NETDEV_CHANGENAME code (no behavior change)

    Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger")
    Signed-off-by: Rafał Miłecki
    Acked-by: Pavel Machek
    Signed-off-by: Jacek Anaszewski

    Rafał Miłecki
     

19 Mar, 2019

1 commit


11 Mar, 2019

1 commit

  • Pull x86 platform driver updates from Darren Hart:

    - use MODULE_DEVICE_TABLE across several wmi drivers, keeping
    wmi_device_id and MODULE_ALIAS() declarations in sync

    - add several Ideapad models to the no_hw_rfkill list

    - add support for new Mellanox platforms, including new fan and LED
    functionality

    - address Dell keyboard backlight change event and power button release
    issues

    - update dell_rbu to use appropriate memory allocation mechanisms

    - several small fixes and Ice Lake support for intel_pmc_core

    - fix a suspend regression for Cherry Trail based devices in
    intel_int0002_vgpio

    - a few other routine fixes

    * tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86: (50 commits)
    MAINTAINERS: Include mlxreg.h in Mellanox Platform Driver files
    platform/x86: ideapad-laptop: Add S130-14IGM to no_hw_rfkill list
    platform/x86: mlx-platform: Fix access mode for fan_dir attribute
    platform/x86: mlx-platform: Add UID LED for the next generation systems
    platform/x86: mlx-platform: Add extra CPLD for next generation systems
    platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
    platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
    modpost: file2alias: define size of alias
    platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Air tablet
    platform/x86: ideapad-laptop: Add Ideapad 530S-14ARR to no_hw_rfkill list
    platform/x86: ideapad-laptop: Add Yoga C930 to no_hw_rfkill_list
    platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown
    platform/x86: intel_pmc_core: Add Package cstates residency info
    platform/x86: intel_pmc_core: Add ICL platform support
    ...

    Linus Torvalds
     

05 Mar, 2019

1 commit

  • …anaszewski/linux-leds

    Pull LED updates from Jacek Anaszewski:

    - finalize previously announced support for initialization of pattern
    triggers from Device Tree

    - fix for null deref on firmware load failure in leds-lp55xx-common.c

    * tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
    leds: lp55xx: fix null deref on firmware load failure
    leds: trigger: timer: Add initialization from Device Tree
    leds: trigger: oneshot: Add initialization from Device Tree
    leds: trigger: pattern: Add pattern initialization from Device Tree
    leds: Add helper for getting default pattern from Device Tree
    dt-bindings: leds: Add pattern initialization from Device Tree

    Linus Torvalds
     

24 Feb, 2019

1 commit

  • Add support for capability register in order to distinct between the
    systems with minor LED configuration differences. It reduces the amount
    of code describing systems' LED configuration.
    For example one system can be equipped with six LED, while the other
    with only four. Reading this information from the capability registers
    allows to use the same LED structure for such systems and set the
    relevant configuration dynamically based on capability register
    content.

    Signed-off-by: Vadim Pasternak
    Acked-by: Jacek Anaszewski
    Signed-off-by: Darren Hart (VMware)

    Vadim Pasternak
     

15 Feb, 2019

1 commit

  • I've stumbled upon a kernel crash and the logs
    pointed me towards the lp5562 driver:

    > [306013.841294] lp5562 0-0030: Direct firmware load for lp5562 failed with error -2
    > [306013.894990] lp5562 0-0030: Falling back to user helper
    > ...
    > [306073.924886] lp5562 0-0030: firmware request failed
    > [306073.939456] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    > [306074.251011] PC is at _raw_spin_lock+0x1c/0x58
    > [306074.255539] LR is at release_firmware+0x6c/0x138
    > ...

    After taking a look I noticed firmware_release()
    could be called with either NULL or a dangling
    pointer.

    Fixes: 10c06d178df11 ("leds-lp55xx: support firmware interface")
    Signed-off-by: Michal Kazior
    Signed-off-by: Jacek Anaszewski

    Michal Kazior
     

18 Jan, 2019

1 commit


17 Jan, 2019

4 commits


26 Dec, 2018

1 commit

  • ….anaszewski/linux-leds

    Pull LED updates from Jacek Anaszewski:
    "There are several few-liners, where most of them are fixes and
    improvments. One thing standing out is ground preparation for
    inititializing trigger parameters via Device Tree.

    We introduce LED_INIT_DEFAULT_TRIGGER flag for that purpose and set it
    when default trigger is matched. It indicates that trigger should
    parse DT properties to retrieve the initialization data when set as
    default one"

    * tag 'leds-for-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
    led: triggers: Initialize LED_INIT_DEFAULT_TRIGGER if trigger is brought after class
    led: triggers: Add LED_INIT_DEFAULT_TRIGGER flag
    led: triggers: Break the for loop after default trigger is found
    leds: pwm: Use OF variant of LED registering function
    leds: pwm: Simplify with resource-managed devm_led_classdev_register()
    leds: gpio: Drop unneeded manual of_node assignment
    leds: 88pm860x: Use of_node_name_eq for node name comparisons
    leds: powernv: add of_node_put()

    Linus Torvalds
     

11 Dec, 2018

3 commits

  • Trigger driver can be initialized after the LED class device driver. In
    such case led_trigger_set_default() won't be called and flag
    LED_INIT_DEFAULT_TRIGGER should be set from led_trigger_register().

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Jacek Anaszewski

    Krzysztof Kozlowski
     
  • Add the flag LED_INIT_DEFAULT_TRIGGER for indicating that trigger
    being set is a default trigger for the LED class device, and
    thus it should be initialized with settings provided in the fwnode.

    Set the flag in the led_trigger_set_default(). It is expected to be
    cleared in the activate() op of a trigger after trigger fwnode
    initialization data is parsed and applied. This should happen only
    once after LED class device registration, to allow leaving triggers
    in the idle state on re-apply and let the users apply their own
    settings without interference from the default ones.

    Signed-off-by: Jacek Anaszewski
    Acked-by: Pavel Machek
    Signed-off-by: Krzysztof Kozlowski

    Jacek Anaszewski
     
  • It is of no avail to continue iterating through registered
    triggers in the led_trigger_set_default() after the trigger to set
    has been found. Add "break" statement to fix this omission.

    Signed-off-by: Jacek Anaszewski
    Acked-by: Pavel Machek
    Signed-off-by: Krzysztof Kozlowski

    Jacek Anaszewski
     

09 Dec, 2018

3 commits


07 Dec, 2018

1 commit

  • Convert string compares of DT node names to use of_node_name_eq helper
    instead. This removes direct access to the node name pointer.

    For instances using of_node_cmp, this has the side effect of now using
    case sensitive comparisons. This should not matter for any FDT based
    system which this is.

    Cc: linux-leds@vger.kernel.org
    Signed-off-by: Rob Herring
    Acked-by: Pavel Machek
    Signed-off-by: Jacek Anaszewski

    Rob Herring
     

28 Nov, 2018

1 commit

  • This patch adds a new LED trigger for coupling the audio mixer change
    with the LED on laptops or other devices. Currently there are two
    trigger types, "audio-mute" and "audio-micmute".

    The audio driver triggers the LED brightness change via
    ledtrig_audio_set() call with the proper type (either mute or
    mic-mute). OTOH, the consumers may call ledtrig_audio_get() for the
    initial brightness value that may have been set by the audio driver
    beforehand.

    This new stuff will be used by HD-audio codec driver and some platform
    drivers (thinkpad_acpi and dell-laptop, also upcoming huawei-wmi).

    Acked-by: Jacek Anaszewski
    Acked-by: Pavel Machek
    Acked-by: Pali Rohár
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

22 Nov, 2018

1 commit

  • of_find_node_by_path() acquires a reference to the node returned by
    it and that reference needs to be dropped by its caller.
    powernv_led_probe() doesn't do that, so fix it.

    Signed-off-by: Yangtao Li
    Signed-off-by: Jacek Anaszewski

    Yangtao Li