aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2017-09-05media: dst_ca: return a proper error code from CA errorsMauro Carvalho Chehab1-19/+22
Right now, on several places, the driver is returning a "-1" error to userspace, instead of a proper error code. Fix it. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-09-05media: ca.h: get rid of CA_SET_PIDMauro Carvalho Chehab1-16/+0
This ioctl seems to be some attempt to support a feature at the bt8xx dst_ca driver. Yet, as said there, it "needs more work". Right now, the code there is just a boilerplate. At the end of the day, no driver uses this ioctl, nor it is documented anywhere (except for "needs more work"). So, get rid of it. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-09-05media: dvb/frontend.h: move out a private internal structureMauro Carvalho Chehab1-0/+11
struct dtv_cmds_h is just an ancillary struct used by the dvb_frontend.c to internally store frontend commands. It doesn't belong to the userspace header, nor it is used anywhere, except inside the DVB core. So, remove it from the header. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-09-05media: dmx.h: split typedefs from structsMauro Carvalho Chehab1-2/+2
Using typedefs inside the Kernel is against CodingStyle, and there's no good usage here. Just like we did at frontend.h, at commit 0df289a209e0 ("[media] dvb: Get rid of typedev usage for enums"), let's keep those typedefs only to provide userspace backward compatibility. No functional changes. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-09-05media: ca.h: split typedefs from structsMauro Carvalho Chehab2-7/+7
Using typedefs inside the Kernel is against CodingStyle, and there's no good usage here. Just like we did at frontend.h, at commit 0df289a209e0 ("[media] dvb: Get rid of typedev usage for enums"), let's keep those typedefs only to provide userspace backward compatibility. No functional changes. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-09-05mac80211_hwsim: Use proper TX powerBeni Lev1-2/+0
In struct ieee80211_tx_info, control.vif pointer and rate_driver_data[0] falls on the same place, depending on the union usage. During the whole TX process, the union is referred to as a control struct, which holds the vif that is later used in the tx flow, especially in order to derive the used tx power. Referring direcly to rate_driver_data[0] and assigning a value to it, overwrites the vif pointer, hence making all later references irrelevant. Moreover, rate_driver_data[0] isn't used later in the flow in order to retrieve the channel that it is pointing to. Cc: [email protected] Signed-off-by: Beni Lev <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2017-09-05Merge branch 'for-4.14/wacom' into for-linusJiri Kosina5-39/+35
- name generation improvement for Wacom devices from Jason Gerecke - Kconfig dependency fix for Wacom driver from Arnd Bergmann
2017-09-05Merge branch 'for-4.14/upstream' into for-linusJiri Kosina3-3/+3
- usb_device_id and snd_rawmidi_ops constifications from Julia Lawall and Arvind Yadav
2017-09-05Merge branch 'for-4.14/multitouch' into for-linusJiri Kosina2-1/+48
- support for media keys on Asus T304UA from João Paulo Rechi Vita - support for Microsoft Win8 Wireless Radio Controls extensions from João Paulo Rechi Vita Conflicts: drivers/hid/hid-ids.h Signed-off-by: Jiri Kosina <[email protected]>
2017-09-05Merge branch 'for-4.14/ish' into for-linusJiri Kosina3-95/+4
- bring consistency into logical minimum numbering in sensor-hub driver, from Srinivas Pandruvada
2017-09-05Merge branch 'for-4.14/driver-lock-removal' into for-linusJiri Kosina1-11/+4
- Arnd pointed out that driver_lock semaphore is superfluous, as driver core already provides all the necessary concurency protection. Removal patch from Binoy Jayan
2017-09-05Merge branch 'for-4.14/constify-attribute_group' into for-linusJiri Kosina4-4/+4
- struct attribute_group constification from Arvind Yadav
2017-09-05Merge branch 'for-4.14/battery' into for-linusJiri Kosina655-10689/+30242
- support for batteries driven by HID input reports, from Dmitry Torokhov
2017-09-05Merge branch 'for-4.14/asus' into for-linusJiri Kosina3-45/+175
- T100 touchpad support from Hans de Goede
2017-09-05rtc: ds1307: use octal permissionsAlexandre Belloni1-1/+1
Octal permissions are preferred over symbolic permissions. Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: ds1307: fix bracesAlexandre Belloni1-3/+3
Fix unnecessary or unbalanced braces. Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: ds1307: fix alignments and blank linesAlexandre Belloni1-11/+10
Alignment should always match open parenthesis. Also remove two unnecessary blank lines Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: ds1307: use BITAlexandre Belloni1-9/+9
Use the BIT macro were possbiel. Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: ds1307: use u32Alexandre Belloni1-4/+4
u32 should be used instead of uint32_t Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: ds1307: use sizeofAlexandre Belloni1-8/+16
Use sizeof where possible to ensure we don't read/write more than the allocated buffer. Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: ds1307: remove regs memberAlexandre Belloni1-100/+107
ds1307->regs is never used before being read or initialized locally. There is no point in keeping a copy in memory. Also limit the size of the read buffer to what is really used, rename buf to regs for consistency and use sizeof() where possible. Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05rtc: Add Realtek RTD1295Andreas Färber3-0/+251
Based on QNAP's arch/arm/mach-rtk119x/driver/rtk_rtc_drv.c code and mach-rtk119x/driver/dc2vo/fpga/include/mis_reg.h register definitions. The base year 2014 was observed on all of Zidoo X9S, ProBox2 Ava and Beelink Lake I. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-05mfd: intel_soc_pmic: Differentiate between Bay and Cherry Trail CRC variantsHans de Goede2-8/+30
Both Bay and Cherry Trail devices may be used together with a Crystal Cove PMIC. Each platform has its own variant of the PMIC, which both use the same ACPI HID, but they are not 100% compatible. This commits makes the intel_soc_pmic_core code check the _HRV of the ACPI-firmware-node and selects intel_soc_pmic_config_byt_crc resp. intel_soc_pmic_config_cht_crc based on this. This fixes the Bay Trail specific ACPI OpRegion code causing problems on Cherry Trail devices. Specifically this was causing the external microsd slot on a Dell Venue 8 5855 (Cherry Trail version) to not work and the eMMC to become unreliable and throw lots of errors. Fixes: 5165238460 ("mfd: intel_soc_pmic: Core driver") Reported-and-tested-by: russianneuromancer <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: intel_soc_pmic: Export separate mfd-cell configs for BYT and CHTHans de Goede3-6/+26
Both Bay and Cherry Trail devices may be used together with a Crystal Cove PMIC. Each platform has its own variant of the PMIC, which both use the same ACPI HID, but they are not 100% compatible. Looking at the android x86 kernel sources where most of the Crystal Cove code comes from, it talks about "Valley View", "Bay Trail" and / or BYT without ever mentioning Cherry Trail, with the exception of the regulator driver. The Asus Zenfone-2 kernel code has 2 regulator drivers, one for Crystal Cove and one for what it calls Crystal Cove Plus. The Crystal Cove Plus regulator driver is the only one to mention Cherry Trail and that driver uses different register addresses then the normal (Bay Trail) Crystal Cove regulator driver, showing that at least the regulator register addresses are different. The GPIO code should work on both, and the PWM code is known to work on both and is necessary for backlight control on some Cherry Trail devices. Testing has shown that the ACPI OpRegion code otoh is causing problems on Cherry Trail devices, which is not surprising as it deals with the regulators and those have different register addresses on CHT. Specifically the ACPI OpRegion code causes the external microsd slot on a Dell Venue 8 5855 (Cherry Trail version) to not work and the eMMC to become unreliable and throw lots of errors. This commit replaces the single mfd_cell array currently used for Crystal Cove with 2 separate arrays, one for the Bay Trail variant and one for the Cherry Trail variant, note that the Cherry Trail version of the array only contains gpio and pwm cells. The PMIC OpRegion cell is deliberately not included and drivers for the other cells in the Bay Trail cell array were never upstreamed. Fixes: 7cf0a66f32 ("mfd: intel_soc_pmic: Crystal Cove support") Reported-and-tested-by: russianneuromancer <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: omap-usb-tll: Fix register offsetsArnd Bergmann1-2/+2
gcc-8 notices that the register number calculation is wrong when the offset is an 'u8' but the number is larger than 256: drivers/mfd/omap-usb-tll.c: In function 'omap_tll_init': drivers/mfd/omap-usb-tll.c:90:46: error: overflow in conversion from 'int' to 'u8 {aka unsigned char}' chages value from 'i * 256 + 2070' to '22' [-Werror=overflow] This addresses it by always using a 32-bit offset number for the register. This is apparently an old problem that previous compilers did not find. Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: da9052: Constify spi_device_idArvind Yadav1-1/+1
spi_device_id are not supposed to change at runtime. All functions working with spi_device_id provided by <linux/i2c.h> work with const spi_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspendFurquan Shaikh1-0/+8
Commit 274e43edcda6f ("mfd: intel-lpss: Do not put device in reset state on suspend") changed the behavior on suspend by not putting LPSS controllers into reset. This was done because S3/S0ix fail if UART device is put into reset and no_console_suspend flag is enabled. Because of the above change, I2C controller gets into a bad state if it observes that the I2C lines are pulled low when power to I2C device is cut off during suspend (generally, I2C lines are pulled to power rail of the I2C device in order to ensure that there is no leakage because of the pulls when device is turned off). This results in the controller timing out for all future I2C operations after resume. It is primarily because of the following sequence of operations: During suspend: 1. I2C controller is disabled, but it is not put into reset. 2. Power to I2C device is cut off. 3. #2 results in the I2C lines being pulled low. ==> At this point the I2C controller gets into a bad state On resume: 1. Power to I2C device is enabled. 2. #2 results in the I2C lines being pulled high. 3. I2C controller is enabled. However, even after enabling the I2C controller, all future I2C xfers fail since the controller is in a bad state and does not attempt to make any transactions and hence times out. In order to ensure that the controller does not get into a bad state, this change puts it into reset if the controller type is not UART. With this change, the order of operations is: During suspend: 1. I2C controller is disabled and put into reset. 2. Power to I2C device is cut off. 3. #2 results in the I2C lines being pulled low. On resume: 1. Power to I2C device is enabled. 2. #2 results in the I2C lines being pulled high. 3. I2C controller is enabled and taken out of reset. Signed-off-by: Furquan Shaikh <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: da9055: Constify i2c_device_idArvind Yadav1-1/+1
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: intel-lpss: Add missing PCI ID for Intel Sunrise Point LPSS devicesFlorian R. Hölzlwimmer1-0/+1
This patch adds a missing PCI ID of the Intel Sunrise Point chipset to the Intel LPSS driver. It fixes a bug causing the touchpad of the Lenovo Yoga 720-15 not to be recognized. See also bug 1700657 on bugs.launchpad.net. Many thanks to CoolStar, who found this solution! Reported-by: CoolStar <[email protected]> Tested-by: Mike Schwartz <[email protected]> Tested-by: Björn Dahlgren <[email protected]> Signed-off-by: Florian R. Hölzlwimmer <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: t7l66xb: Handle return value of clk_prepare_enableArvind Yadav1-3/+14
clk_prepare_enable() can fail here and we must check its return value. we must disable clock, if t7l66xb_probe is not successful. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: intel_soc_pmic_chtwc: Turn Kconfig option into a boolHans de Goede1-1/+1
The PMIC provides ACPI OpRegions which must be available for other drivers' PS0 / PS3 methods early-on as such it must be builtin as the Kconfig help text already states. Somehow its Kconfig option ended up being a tristate though, this fixes this. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: lp87565: Convert to use devm_mfd_add_devices()Axel Lin1-4/+3
This fixes missing mfd_remove_devices() call when unload the module. Signed-off-by: Axel Lin <[email protected]> Reviewed-by: Keerthy <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: Add support for TPS68470 deviceRajmohan Mani3-0/+125
The TPS68470 device is an advanced power management unit that powers a Compact Camera Module (CCM), generates clocks for image sensors, drives a dual LED for Flash and incorporates two LED drivers for general purpose indicators. This patch adds support for TPS68470 mfd device. Signed-off-by: Rajmohan Mani <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Haswell/BroadwellMika Westerberg1-10/+0
At least on Lenovo Thinkpad Yoga, the BIOS seems to monitor the SPI-NOR write protection bit and if it is flipped to read/write it assumes the BIOS configuration was changed on next reboot. It then, for unknown reasons, resets the BIOS settings back to default. We can prevent this by just leaving the write protection bit intact and let the SPI-NOR driver know whether the device is writable or not. In case of this particular Lenovo the SPI-NOR flash will be exposed as read-only. Fixes: ff00d7a32a1b ("mfd: lpc_ich: Add support for SPI serial flash host controller") Link: https://bugzilla.kernel.org/show_bug.cgi?id=195951 Reported-by: Abdó Roig-Marange <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: syscon: atmel-smc: Add helper to retrieve register layoutLudovic Desroches3-21/+69
For HSMC controller, the register layout depends on the device i.e. the offset of setup, pulse, cycle, mode and timings registers is not the same. An helper is added to provide the correct register layout. Fixes: fe9d7cb22ef3 ("mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation") Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Ludovic Desroches <[email protected]> Acked-by: Boris Brezillon <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: axp20x: Use correct platform device ID for many PEKQuentin Schulz1-6/+6
According to their datasheets, the AXP221, AXP223, AXP288, AXP803, AXP809 and AXP813 PEK have different values for startup time bits from the AXP20X, let's use the platform device id with the correct values. Signed-off-by: Quentin Schulz <[email protected]> Signed-off-by: Chen-Yu Tsai <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: axp20x: Add support for AXP813 PMICChen-Yu Tsai2-0/+23
The X-Powers AXP813 PMIC is normally used with Allwinner's A83T SoC. It has the same range of functions as other X-Powers PMICs, such as DC-DC buck converter and linear regulator outputs, AC-IN and VBUS power supplies, power button trigger, GPIOs, ADCs, and a battery charger. Note that the IRQ table given in the datasheet is incorrect: in IRQ enable/status registers 1, there are separate IRQs for ACIN and VBUS, instead of bits [7:5] being the same as bits [4:2]. So it shares the same IRQs as the AXP803, rather than the AXP288. This patch adds basic mfd support for it, with only the power button enabled. Signed-off-by: Chen-Yu Tsai <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: Add ROHM BD9571MWV-M MFD PMIC driverMarek Vasut3-0/+245
Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS entry. The MFD part only specifies the regmap bits for the PMIC and binds the subdevs together. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: hi6421-pmic: Add support for HiSilicon Hi6421v530Guodong Xu1-18/+52
Add support for HiSilicon Hi6421v530 PMIC. Hi6421v530 communicates with main SoC via memory-mapped I/O. Hi6421v530 and Hi6421 are PMIC chips from the same vendor, HiSilicon, but at different revisions. They share the same memory-mapped I/O design. They differ in integrated devices, such as regulator details, LDO voltage points. Signed-off-by: Guodong Xu <[email protected]> Signed-off-by: Wang Xiaoyin <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: hi6421-pmic: Update dev_err messagesGuodong Xu1-3/+3
Update dev_err messages to make them more readable. Signed-off-by: Guodong Xu <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: hi6421-pmic: Change license text to shorter formGuodong Xu1-11/+2
Change license text to a shorter form of GPLv2. Signed-off-by: Guodong Xu <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: Kconfig: Add missing Kconfig dependency for TPS65086Michal Simek1-0/+1
MTF_CORE should be enabled when driver is enabled. Without this patch you can configure: CONFIG_MFD_CORE is not set CONFIG_MFD_TPS65086=y ... which ends up with compilation error: drivers/mfd/tps65086.o: In function `tps65086_probe': drivers/mfd/tps65086.c:110: undefined reference to `mfd_add_devices' drivers/mfd/tps65086.c:110:(.text+0x128): relocation truncated to fit: \ R_AARCH64_CALL26 against undefined symbol `mfd_add_devices' Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: ab8500-core: Constify attribute_group structuresArvind Yadav1-3/+3
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 16298 1009 184 17491 4453 drivers/mfd/ab8500-core.o File size After adding 'const': text data bss dec hex filename 16490 817 184 17491 4453 drivers/mfd/ab8500-core.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: max8998: Fix potential NULL pointer dereferenceChristophe JAILLET1-4/+2
if 'max8998_i2c_parse_dt_pdata() fails (when out of memory), a NULL pointer dereference will occur in the error handling code. Return directly instead. Fixes: ee999fb3f17f("mfd: max8998: Add support for Device Tree") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: max8925-i2c: Drop unnecessary staticJulia Lawall1-1/+1
Drop static on a local variable, when the variable is initialized before any use, on every possible execution path through the function. The static has no benefit, and dropping it reduces the code size. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // </smpl> The change in code size is indicates by the following output from the size command. before: text data bss dec hex filename 2579 240 16 2835 b13 drivers/mfd/max8925-i2c.o after: text data bss dec hex filename 2531 240 8 2779 adb drivers/mfd/max8925-i2c.o Signed-off-by: Julia Lawall <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: da9052: Fix manual ADC read after timed out readSebastian Reichel1-0/+2
It is possible that under heavy system load, the counter in the completion struct, used for waiting for end of AD conversion, gets incremented twice. To make sure the driver recovers from this situation, the completion struct should be reinitialized. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: rtsx: Make arrays depth and cd_mask static constColin Ian King1-2/+2
Don't populate the arrays depath and cd_mask on the stack but make them static const. Makes the object code smaller: text data bss dec hex filename 25413 7216 448 33077 8135 drivers/mfd/rtsx_pcr.o text data bss dec hex filename 25151 7360 448 32959 80bf drivers/mfd/rtsx_pcr.o Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05mfd: twl-core: Improve the documentationDan Carpenter1-2/+2
Saying it "returns the result" seems tautological. The read function does not return num_bytes on success, it returns zero on success. I noticed this discrepancy because some of the callers were checking for >= 0. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-09-05Merge branches 'ib-mfd-arm-i2c-4.14', 'ib-mfd-arm-usb-video-4.14', ↵Lee Jones890-4843/+15192
'ib-mfd-hwmon-4.14', 'ib-mfd-iio-pwm-4.14', 'ib-mfd-input-rtc-4.14', 'ib-mfd-many-4.14' and 'ib-mfd-pinctrl-regulator-4.14' into ibs-for-mfd-merged
2017-09-05dmaengine: sun6i: support V3s SoC variantIcenowy Zheng1-0/+13
Allwinner V3s has a DMA engine similar to the ones from A31, but with fewer channels and DRQs. Add support for it. Signed-off-by: Icenowy Zheng <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Vinod Koul <[email protected]>