[PATCH v5 07/11] dmaengine: sun6i: Retrieve channel count/max request from devicetree

2017-10-16 Thread Stefan Brüns
sparse port mapping. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard --- Changes in v5: - Rebase on slave-dma/next tree Changes in v4: - remove range checks for dma-channels/dma-requests DT properties Changes in v3: None Changes in v2: - Set default number of dma-request if not provided

[PATCH] platform/x86: hp-wmi: Fix tablet mode detection for convertibles

2017-11-02 Thread Stefan Brüns
Commit f9cf3b2880cc ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") consolidated the methods for docking and laptop mode detection, but omitted to apply the correct mask for the laptop mode (it always uses the constant for docking). Signed-off-by: Stefan Brüns --- T

[PATCH 4/4] platform/x86: intel-vbtn: support panel front button

2017-11-03 Thread Stefan Brüns
The Lenovo Helix 2 and Dell XPS 12 (9Q33) have an extra button on the front showing a 'Windows' logo, both reporting event codes 0xC2/0xC3 on press/release. Tested on XPS 12, for info on the Helix 2 see: https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html Signed-off-by: St

[PATCH 2/4] platform/x86: intel-vbtn: support SW_TABLET_MODE

2017-11-03 Thread Stefan Brüns
Event code 0xcc is emitted by several convertibles (Dell XPS 12 9Q33 BIOS A8, Dell XPS 13 2in1 9365, HP Spectre x360, Lenovo Thinkpad Helix) when entering tablet mode, and 0xcd on return to laptop mode. Signed-off-by: Stefan Brüns --- The changes where tested on an XPS 12 with BIOS version A8

[PATCH 3/4] platform/x86: intel-vbtn: support KEY_ROTATE_DISPLAY

2017-11-03 Thread Stefan Brüns
The Rotate Lock button event is emitted on the XPS 12 (BIOS A8, but not on BIOS A2). Signed-off-by: Stefan Brüns --- The changes where tested on an XPS 12 with BIOS version A8 (2015-03-03). An earlier BIOS version (A2, ~2013) did not report the event, at least not using the INT33D6 plattform

[PATCH 0/4] platform/x86: intel-vbtn: Add support for several more switches/buttons

2017-11-03 Thread Stefan Brüns
logo" button/key found on the XPS 12 display (i.e. in tablet mode, it is the only key reachable). The Lenovo Helix 2 has an equivalent touch button. The event currently uses KEY_MENU, although a distinct key code may be a better choice. Stefan Brüns (4): Input: sparse-keymap - send sync

[PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW

2017-11-03 Thread Stefan Brüns
* events, but it is required for the intel-vbtn platform driver to generate SW_TABLET_MODE events. Signed-off-by: Stefan Brüns --- drivers/input/sparse-keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index bb0349fa64bc

Re: [2/3] iio: adc: ina2xx: Adhere to documented ABI, use Ohm instead of uOhm

2017-11-06 Thread Stefan Brüns
On Thursday, November 2, 2017 10:04:01 AM CET Maciej Purski wrote: > On 10/14/2017 08:27 PM, Stefan Bruens wrote: > > On Montag, 9. Oktober 2017 11:29:43 CEST Maciej Purski wrote: > >> On 10/01/2017 09:48 PM, Stefan Brüns wrote: > >>> According to the ABI documenta

[PATCH v2 2/3] iio: adc: ina2xx: Use LSB specifier instead of divider in config

2017-10-28 Thread Stefan Brüns
While the config uses the physical value corresponding to the LSB for both the power and the bus voltage register, the shunt voltage is specified as parts of 1 mV. Use the LSB physical value for all registers. No functional change. Signed-off-by: Stefan Brüns --- Changes in v2: - new patch

[PATCH v2 0/3] iio: adc: ina2xx: Fixes and extensions

2017-10-28 Thread Stefan Brüns
, not bus voltage register - Shift instead of masking the LSBs - new patch - Fix conversion for shunt gain, function expects milli, not micro Stefan Brüns (3): iio: adc: ina2xx: Shift bus voltage register to mask flag bits iio: adc: ina2xx: Use LSB specifier instead of divider in config iio

[PATCH v2 3/3] iio: adc: ina2xx: Allow setting Shunt Voltage PGA gain and Bus Voltage range

2017-10-28 Thread Stefan Brüns
uniform API to userspace. As the gain settings are incorporated into the raw values by the sensor itself, adjusting of the scale attributes is not necessary. Signed-off-by: Stefan Brüns --- Changes in v2: - Fix conversion for shunt gain, function expects milli, not micro drivers/iio/adc/ina2xx

[PATCH v2 1/3] iio: adc: ina2xx: Shift bus voltage register to mask flag bits

2017-10-28 Thread Stefan Brüns
Lower bits of the INA219/220 bus voltage register are conversion status flags, properly shift the value. When reading via IIO buffer, the value is passed on unaltered, shifting is the responsibility of the user. Signed-off-by: Stefan Brüns --- Changes in v2: - Apply to the shunt voltage, not

Re: [PATCH v1 0/2] Remove duplicate driver for MyGica T230C

2018-01-24 Thread Stefan Brüns
On Wednesday, 10 January 2018 00:33:37 CET Stefan Brüns wrote: > In 2017-02, two drivers for the T230C where submitted, but until now > only the one based on the older dvb-usb/cxusb.c driver has been part > of the mainline kernel. As a dvb-usb-v2 driver is preferable, remove > the

[PATCH v1 2/2] [media] cxusb: restore RC_MAP for MyGica T230

2018-01-09 Thread Stefan Brüns
Commit f8585ce655e9cdeabc38e8e2580b05735110e4a5 ("[media] dvb-usb-cxusb: Geniatech T230C support") sneaked in an unrelated change for the older T230 (not C) model. As the commit was reverted this change was reverted too, although likely correct. Signed-off-by: Stefan Brüns --- dri

[PATCH v1 1/2] Revert "[media] dvb-usb-cxusb: Geniatech T230C support"

2018-01-09 Thread Stefan Brüns
From: Evgeny Plehov This reverts commit f8585ce655e9cdeabc38e8e2580b05735110e4a5. The T230C is handled by the dvb-usb-v2/dvbsky.c driver, which should be preferred over a dvb-usb (v1) driver. Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb/cxusb.c | 139

[PATCH v1 0/2] Remove duplicate driver for MyGica T230C

2018-01-09 Thread Stefan Brüns
. a correction of the RC model. As this change apparently is correct, restore it. This has not been tested due to lack of hardware. Evgeny Plehov (1): Revert "[media] dvb-usb-cxusb: Geniatech T230C support" Stefan Brüns (1): [media] cxusb: restore RC_MAP for MyGica T230 drivers/med

Re: [PATCH] iio: adc: ina2xx: fix missing break statement

2018-10-10 Thread Stefan Brüns
SCALE. I would prefer an early "return -EINVAL" here, as it matches better with the other "switch (mask)" cases above. Kind regards, Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 signature.asc Description: This is a digitally signed message part.

Re: [PATCH][V2] iio: adc: ina2xx: add in early -EINVAL returns in case statements

2018-10-16 Thread Stefan Brüns
128 264346742 drivers/iio/adc/ina2xx-adc.o > > (gcc 8.2, x86-64) > > Detected by CoverityScan, CID#1462408 ("Missing break in switch") > > --- > > V2: use returns instead of break statements to keep with the > current style used in the switch statement. &g

[PATCH] media: dvbsky: Avoid leaking dvb frontend

2019-01-19 Thread Stefan Brüns
I, but it also affects the MyGica T230C. As all supported devices structure the registration/ unregistration identically, apply the change for all device types. Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb-v2/dvbsky.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletion

[PATCH v2 3/3] media: af9035: Remove duplicate error reporting for dvbsky_usb_generic_rw

2019-05-19 Thread Stefan Brüns
All error cases inside the function already report errors via dev_err(), and dvb_usb_v2_generic_rw also reports all error cases, so there is no silent code path when an error has occured. Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb-v2/af9035.c | 2 -- 1 file changed, 2 deletions

[PATCH v2 2/3] media: dvbsky: Remove duplicate error reporting for dvbsky_usb_generic_rw

2019-05-19 Thread Stefan Brüns
Errors are already reported by the common code in dvb_usb_v2_generic_io (which dvbsky_usb_generic_rw is a wrapper of), so there is no reason report the error again. Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb-v2/dvbsky.c | 11 --- 1 file changed, 11 deletions(-) diff

[PATCH v2 1/3] media: dvb-usb-v2: Report error on all error paths

2019-05-19 Thread Stefan Brüns
ret is returned. Skip setting ret and return immediately (no cleanup necessary). Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c b/drivers

[PATCH v2 0/3] Cleanup error reporting

2019-05-19 Thread Stefan Brüns
and af9035. v2: Add Signed-off-by Stefan Brüns (3): media: dvb-usb-v2: Report error on all error paths media: dvbsky: Remove duplicate error reporting for dvbsky_usb_generic_rw media: af9035: Remove duplicate error reporting for dvbsky_usb_generic_rw drivers/media/usb/dvb-usb-v

[PATCH v2 0/3] Add support for MyGica T230C DVB-T2 stick

2017-02-14 Thread Stefan Brüns
The required command sequence for the new tuner (Si2141) was traced from the current Windows driver and verified with a small python script/libusb. The changes to the Si2168 and dvbsky driver are mostly additions of the required IDs and some glue code. Stefan Brüns (3): [media] si2157: Add

[PATCH v2 3/3] [media] dvbsky: MyGica T230C support

2017-02-14 Thread Stefan Brüns
Mygica T230 DVB-T/T2/C USB stick support. It uses the same FX2/Si2168 bridge/demodulator combo as the other devices supported by the driver, but uses the Si2141 tuner. Several DVB-T (MPEG2) and DVB-T2 (H.265) channels were tested, as well as the include remote control. Signed-off-by: Stefan Brüns

[PATCH v2 2/3] [media] si2168: add support for Si2168-D60

2017-02-14 Thread Stefan Brüns
Add handling for new revision, requiring new firmware. Signed-off-by: Stefan Brüns --- drivers/media/dvb-frontends/si2168.c | 4 drivers/media/dvb-frontends/si2168_priv.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb

[PATCH v2 1/3] [media] si2157: Add support for Si2141-A10

2017-02-14 Thread Stefan Brüns
The Si2141 needs two distinct commands for powerup/reset, otherwise it will not respond to chip revision requests. It also needs a firmware to run properly. Signed-off-by: Stefan Brüns --- drivers/media/tuners/si2157.c | 23 +-- drivers/media/tuners/si2157_priv.h | 2

[PATCH v3 1/3] [media] si2157: Add support for Si2141-A10

2017-02-16 Thread Stefan Brüns
The Si2141 needs two distinct commands for powerup/reset, otherwise it will not respond to chip revision requests. It also needs a firmware to run properly. Signed-off-by: Stefan Brüns --- drivers/media/tuners/si2157.c | 23 +-- drivers/media/tuners/si2157_priv.h | 2

[PATCH v3 2/3] [media] si2168: add support for Si2168-D60

2017-02-16 Thread Stefan Brüns
Add handling for new revision, requiring new firmware. Signed-off-by: Stefan Brüns --- drivers/media/dvb-frontends/si2168.c | 4 drivers/media/dvb-frontends/si2168_priv.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb

[PATCH v3 3/3] [media] dvbsky: MyGica T230C support

2017-02-16 Thread Stefan Brüns
Mygica T230 DVB-T/T2/C USB stick support. It uses the same FX2/Si2168 bridge/demodulator combo as the other devices supported by the driver, but uses the Si2141 tuner. Several DVB-T (MPEG2) and DVB-T2 (H.265) channels were tested, as well as the included remote control. Signed-off-by: Stefan

[PATCH v3 0/3] Add support for MyGica T230C DVB-T2 stick

2017-02-16 Thread Stefan Brüns
The required command sequence for the new tuner (Si2141) was traced from the current Windows driver and verified with a small python script/libusb. The changes to the Si2168 and dvbsky driver are mostly additions of the required IDs and some glue code. Stefan Brüns (3): [media] si2157: Add

[PATCH v2] [media] dvb-usb-firmware: don't do DMA on stack

2017-02-12 Thread Stefan Brüns
The buffer allocation for the firmware data was changed in commit 43fab9793c1f ("dvb-usb: don't use stack for firmware load"), but the same applies for the reset value. Signed-off-by: Stefan Brüns --- This patch replaces the earlier submission conflicting with commit 43fab9793c

[PATCH 1/3] [media] si2157: Add support for Si2141-A10

2017-02-12 Thread Stefan Brüns
The Si2141 needs two distinct commands for powerup/reset, otherwise it will not respond to chip revision requests. It also needs a firmware to run properly. Signed-off-by: Stefan Brüns --- drivers/media/tuners/si2157.c | 23 +-- drivers/media/tuners/si2157_priv.h | 2

[PATCH 3/3] [media] cxusb: MyGica T230C support

2017-02-12 Thread Stefan Brüns
Mygica T230 DVB-T/T2/C USB stick support. It uses the same FX2/Si2168 bridge/demodulator combo as the T230, but uses the Si2141 tuner. Factor out the common code and pass the tuner type and if port as parameter, to avoid duplicating the initialization code. Signed-off-by: Stefan Brüns

[PATCH 0/3] Add support for MyGica T230C DVB-T2 stick

2017-02-12 Thread Stefan Brüns
The required command sequence for the new tuner (Si2141) was traced from the current Windows driver and verified with a small python script/libusb. The changes to the Si2168 and cxusb driver are mostly addition of the required IDs and some glue code. Stefan Brüns (3): [media] si2157: Add

[PATCH 2/3] [media] si2168: add support for Si2168-D60

2017-02-12 Thread Stefan Brüns
Add handling for new revision, requiring new firmware. Signed-off-by: Stefan Brüns --- drivers/media/dvb-frontends/si2168.c | 4 drivers/media/dvb-frontends/si2168_priv.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb

[PATCH 2/2] sierra_net: Skip validating irrelevant fields for IDLE LSIs

2017-02-06 Thread Stefan Brüns
When the context is deactivated, the link_type is set to 0xff, which triggers a warning message, and results in a wrong link status, as the LSI is ignored. Signed-off-by: Stefan Brüns --- drivers/net/usb/sierra_net.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 0/2] Fixes for sierra_net driver

2017-02-06 Thread Stefan Brüns
, APN internet.telekom, IPv4v6 PDP type. Stefan Brüns (2): sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications sierra_net: Skip validating irrelevant fields for IDLE LSIs drivers/net/usb/sierra_net.c | 92 ++-- 1 file changed, 63

[PATCH 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications

2017-02-06 Thread Stefan Brüns
erent link type. Signed-off-by: Stefan Brüns --- Example LSI LINK UP indication: 00 ed 78 00 04 01 00 e9 0a 14 00 54 00 65 00 6c ..xT.e.l 0010 00 65 00 6b 00 6f 00 6d 00 2e 00 64 00 65 48 03 .e.k.o.m...d.eH. 0020 c8 be d1 00 62 00 00 00 2c 80 f0 01 00 00 00 00 b...,...

[PATCH v2 2/2] sierra_net: Skip validating irrelevant fields for IDLE LSIs

2017-02-06 Thread Stefan Brüns
When the context is deactivated, the link_type is set to 0xff, which triggers a warning message, and results in a wrong link status, as the LSI is ignored. Signed-off-by: Stefan Brüns --- drivers/net/usb/sierra_net.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v2 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications

2017-02-06 Thread Stefan Brüns
erent link type. Signed-off-by: Stefan Brüns --- v2: Do not overwrite protocol field in rx_fixup Example LSI LINK UP indication: 00 ed 78 00 04 01 00 e9 0a 14 00 54 00 65 00 6c ..xT.e.l 0010 00 65 00 6b 00 6f 00 6d 00 2e 00 64 00 65 48 03 .e.k.o.m...d.eH. 0020 c8 be d1 00 62 0

[PATCH v2 0/2] Fixes for sierra_net driver

2017-02-06 Thread Stefan Brüns
, APN internet.telekom, IPv4v6 PDP type. Both IPv4 and IPv6 connections work. v2: Do not overwrite protocol field in rx_fixup Stefan Brüns (2): sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications sierra_net: Skip validating irrelevant fields for IDLE LSIs drivers/net/usb

[PATCH v3 0/2] Fixes for sierra_net driver

2017-02-07 Thread Stefan Brüns
, APN internet.telekom, IPv4v6 PDP type. Both IPv4 and IPv6 connections work. v2: Do not overwrite protocol field in rx_fixup v3: Remove leftover struct ethhdr *eth declaration Stefan Brüns (2): sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications sierra_net: Skip validating

[PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications

2017-02-07 Thread Stefan Brüns
erent link type. Signed-off-by: Stefan Brüns --- v2: Do not overwrite protocol field in rx_fixup v3: Remove leftover struct ethhdr *eth declaration Example LSI LINK UP indication: 00 ed 78 00 04 01 00 e9 0a 14 00 54 00 65 00 6c ..xT.e.l 0010 00 65 00 6b 00 6f 00 6d 00 2e 00 64 0

[PATCH v3 2/2] sierra_net: Skip validating irrelevant fields for IDLE LSIs

2017-02-07 Thread Stefan Brüns
When the context is deactivated, the link_type is set to 0xff, which triggers a warning message, and results in a wrong link status, as the LSI is ignored. Signed-off-by: Stefan Brüns --- drivers/net/usb/sierra_net.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 1/2] [media] cxusb: Use a dma capable buffer also for reading

2017-02-05 Thread Stefan Brüns
f 0 by itself, avoid calling it using the dvb_usb_generic_read wrapper function. Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb/cxusb.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.

[PATCH 2/2] [media] dvb-usb-firmware: don't do DMA on stack

2017-02-05 Thread Stefan Brüns
The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Stefan Brüns --- drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 30 1 file changed, 17

[PATCH 0/2] Enhancements for TI INA219/220 current/voltage monitors

2017-04-11 Thread Stefan Brüns
sets the config register accordingly. Stefan Brüns (2): iio: adc: Fix integration time/averaging for INA219/220 iio: adc: Allow setting Shunt Voltage PGA gain and Bus Voltage range drivers/iio/adc/ina2xx-adc.c | 344 --- 1 file changed, 322 insertions

[PATCH 2/2] iio: adc: Allow setting Shunt Voltage PGA gain and Bus Voltage range

2017-04-11 Thread Stefan Brüns
Reducing shunt and bus voltage range improves the accuracy, so allow altering the default settings. Signed-off-by: Stefan Brüns --- drivers/iio/adc/ina2xx-adc.c | 165 ++- 1 file changed, 164 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc

[PATCH 1/2] iio: adc: Fix integration time/averaging for INA219/220

2017-04-11 Thread Stefan Brüns
INA219. Signed-off-by: Stefan Brüns --- drivers/iio/adc/ina2xx-adc.c | 179 ++- 1 file changed, 158 insertions(+), 21 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 3263231276ca..d1678f886297 100644 --- a/drivers

[PATCH v2 2/3] iio: adc: Fix integration time/averaging for INA219/220

2017-05-23 Thread Stefan Brüns
INA219. Signed-off-by: Stefan Brüns --- drivers/iio/adc/ina2xx-adc.c | 204 ++- 1 file changed, 182 insertions(+), 22 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index bba10a1b2fcb..232c0b80d658 100644 --- a/drivers

[PATCH v2 1/3] iio: adc: ina2xx: Make use of attribute flags consistent on all channels

2017-05-23 Thread Stefan Brüns
Flags for shared channel attributes should be set on all channels of a channel set. I.e. SAMP_FREQUENCY and OVERSAMPLING_RATIO are set on the in_voltage{0,1} channels, thus should be set on in_power, in_current. Signed-off-by: Stefan Brüns --- drivers/iio/adc/ina2xx-adc.c | 2 ++ 1 file changed

[PATCH v2 3/3] iio: adc: Fix polling of INA219 conversion ready flag

2017-05-23 Thread Stefan Brüns
While the INA226 has a conversion ready flag (CVRF) in the R/W Mask/Enable register with read-to-clear semantics, the corresponding bit of the INA219 (CNVR) is part of the bus voltage register. The flag is cleared by reading the power register. Signed-off-by: Stefan Brüns --- drivers/iio/adc

[PATCH v2 0/3] Enhancements for TI INA219/220 current/voltage monitors

2017-05-23 Thread Stefan Brüns
/ averaging from INA219/220 - changed Patch v1 1/2 (now 2/3, feedback by Jonathan Cameron): * Use correct flags for all channels/chips * Improve readability of chip/channel handling in if statement - dropped Patch v1 2/2 for now - added Patch v2 3/3 Stefan Brüns (3): iio: adc: ina2xx

[PATCH 1/2] iio: Documentation: Add missing documentation for power attribute

2017-07-16 Thread Stefan Brüns
Commit c43a102e67db ("iio: ina2xx: add support for TI INA2xx Power Monitors") introduced the in_powerY_raw attribute, but omitted the corresponding documentation. The description is correct for the INA2xx and the MAX9611 IIO drivers. Signed-off-by: Stefan Brüns --- Documentation/A

[PATCH 2/2] iio: Documentation: Add ina2xx shunt_resistor attribute documentation

2017-07-16 Thread Stefan Brüns
The ina2xx driver appeared in the Linux kernel version 4.5, but provided no documentation. Contrary to other uses of resistance in IIO, ina2xx uses microohms instead of ohms in the sysfs attribute. Signed-off-by: Stefan Brüns --- Documentation/ABI/testing/sysfs-bus-iio-adc-ina2xx-adc | 7

[PATCH 0/2] iio: Documentation enhancements

2017-07-16 Thread Stefan Brüns
use of ohms for resistance in IIO, thus is added as ina2xx specific documentation. Stefan Brüns (2): iio: Documentation: Add missing documentation for power attribute iio: Documentation: Add ina2xx shunt_resistor attribute documentation Documentation/ABI/testing/sysfs-bus-iio| 9

[PATCH v3 5/7] iio: adc: ina2xx: Use a monotonic clock for delay calculation

2017-12-31 Thread Stefan Brüns
iteration. In case the conversion overrruns the register readout (i.e. fast sampling combined with a slow bus), one or multiple samples will be dropped. Signed-off-by: Stefan Brüns --- Changes in v3: - use s64_div for 64 bit integer division to fix compiles on 32 bit archs Changes in v2: - add a

[PATCH v2] drm/i915: Try EDID bitbanging on HDMI after failed read

2017-12-31 Thread Stefan Brüns
the center. Fallback to bitbanging is already done for the CRT connector. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92685 Signed-off-by: Stefan Brüns --- Changes in v2: - Fix/enhance commit message, no code changes drivers/gpu/drm/i915/intel_hdmi.c | 14 +++--- 1 file c

[PATCH v4 5/7] iio: adc: ina2xx: Use a monotonic clock for delay calculation

2017-12-31 Thread Stefan Brüns
iteration. In case the conversion overrruns the register readout (i.e. fast sampling combined with a slow bus), one or multiple samples will be dropped. Signed-off-by: Stefan Brüns --- Changes in v4: - Typo, div_s64, not s64_div Changes in v3: - use s64_div for 64 bit integer division to fix

[PATCH v2 1/7] iio: adc: ina2xx: Remove bogus cast for data argument

2017-12-21 Thread Stefan Brüns
iio_push_to_buffers_with_timestamp expects a void pointer, so the cast is both unnecessary and misleading. Signed-off-by: Stefan Brüns --- Changes in v2: None drivers/iio/adc/ina2xx-adc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b

[PATCH v2 7/7] iio: adc: ina2xx: Actually align the loop with the conversion ready flag

2017-12-21 Thread Stefan Brüns
schedule it one interval after the flag bit has been set. Split the work function in two functions, one for the status poll and one for reading the values, to be able to note down the time when the flag bit is raised. Signed-off-by: Stefan Brüns --- Changes in v2: - Describe old behaviour in

[PATCH v2 4/7] iio: adc: ina2xx: Do not udelay for several seconds

2017-12-21 Thread Stefan Brüns
The conversion time can be up to 16 seconds (8 ms per channel, 2 channels, 1024 times averaging). Signed-off-by: Stefan Brüns --- Changes in v2: None drivers/iio/adc/ina2xx-adc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers

[PATCH v2 6/7] iio: adc: ina2xx: Align timestamp with conversion ready flag

2017-12-21 Thread Stefan Brüns
As the timestamp is no longer (ab-)used to measure the function run time, it can be taken at the correct time, i.e. when the conversion has finished. Signed-off-by: Stefan Brüns --- Changes in v2: None drivers/iio/adc/ina2xx-adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 5/7] iio: adc: ina2xx: Use a monotonic clock for delay calculation

2017-12-21 Thread Stefan Brüns
iteration. In case the conversion overrruns the register readout (i.e. fast sampling combined with a slow bus), one or multiple samples will be dropped. Signed-off-by: Stefan Brüns --- Changes in v2: - add a comment mentioning skipping samples on overrun drivers/iio/adc/ina2xx-adc.c | 41

[PATCH v2 2/7] iio: adc: ina2xx: Clarify size requirement for data buffer

2017-12-21 Thread Stefan Brüns
The timestamp is inserted into the buffer after the sample data by iio_push_to_buffers_with_timestamp, document the space requirement for the timestamp. Signed-off-by: Stefan Brüns --- Changes in v2: None drivers/iio/adc/ina2xx-adc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v2 0/7] iio: adc: ina2xx: Rework CNVR alignment, fix busy loops

2017-12-21 Thread Stefan Brüns
t sampling intervals inbetween. Changes in v2: - add a comment mentioning skipping samples on overrun - Describe old behaviour in commit message more clearly No real code changes, but added a comment in patch 5, and clarified commit messages of patch 5 and 7. Stefan Brüns (7): iio: adc: ina2xx: Re

[PATCH v2 3/7] iio: adc: ina2xx: Remove unneeded dummy read to clear CNVR flag

2017-12-21 Thread Stefan Brüns
/2378282 Signed-off-by: Stefan Brüns --- Changes in v2: None drivers/iio/adc/ina2xx-adc.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 8c8120406f52..b027d485398b 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b

[PATCH v1] drm/i915: Try EDID bitbanging on HDMI after failed read

2017-12-24 Thread Stefan Brüns
the center. Fallback to bitbanging is already done for the CRT connector. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92685 Signed-off-by: Stefan Brüns --- drivers/gpu/drm/i915/intel_hdmi.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

Re: [Intel-gfx] [PATCH v2] drm/i915: Try EDID bitbanging on HDMI after failed read

2018-01-03 Thread Stefan Brüns
On Wednesday, January 3, 2018 8:14:47 AM CET Jani Nikula wrote: > On Tue, 02 Jan 2018, Chris Wilson wrote: > > Quoting Rodrigo Vivi (2018-01-02 19:12:18) > > > >> On Sun, Dec 31, 2017 at 10:34:54PM +, Stefan Brüns wrote: > >> > +

Re: [PATCH v3] iio: adc: ina2xx: Make calibration register value fixed

2017-12-17 Thread Stefan Brüns
resistor value is just stored. > static int set_shunt_resistor(struct ina2xx_chip_info *chip, unsigned int > val) { > - if (val <= 0 || val > chip->config->calibration_factor) > + if (val == 0 || val > INT_MAX) > return -EINVAL; > >

Re: [PATCH v4] iio: adc: ina2xx: Make calibration register value fixed

2017-12-18 Thread Stefan Brüns
> Power_lsb value should also follow shunt_resistor changes as stated in > datasheet: > power_lsb = 25 * current_lsb (ina 226) > power_lsb = 20 * current_lsb (ina 219) > > This is a part of the patchset: https://lkml.org/lkml/2017/11/22/394 > > Signed-off-by: Maciej Pursk

Re: [PATCH v1 3/7] iio: adc: ina2xx: Remove unneeded dummy read to clear CNVR flag

2017-12-12 Thread Stefan Brüns
On Tuesday, December 12, 2017 9:15:30 PM CET Jonathan Cameron wrote: > On Sun, 10 Dec 2017 21:53:42 +0100 > > Stefan Brüns wrote: > > On Sunday, December 10, 2017 6:27:33 PM CET Jonathan Cameron wrote: > > > On Fri, 8 Dec 2017 18:41:48 +0100 > > > > > >

[RESEND PATCH 0/2] Enable SPI on A64/Pine64

2017-08-29 Thread Stefan Brüns
eMMC controller, as the MISO pin is also used for the HS400 eMMC data strobe. This is only a concern if the board uses eMMC (does not apply to the Pine64) *and* is using HS400 mode. The same pin conflict exists for the H5. Stefan Brüns (2): arm64: allwinner: a64: add SPI nodes arm64: allwinner

[RESEND PATCH 1/2] arm64: allwinner: a64: add SPI nodes

2017-08-29 Thread Stefan Brüns
The A64 SPI controllers are register compatible to the h3/h5 SPI controllers. The A64 has two SPI controllers, each with a single chip select. The handles for the DMA channels (23/24 for SPI0/SPI1) are omitted, as the A64 DMA controller node is currently missing. Signed-off-by: Stefan Brüns

[RESEND PATCH 2/2] arm64: allwinner: pine64: Enable spi0/spi1

2017-08-29 Thread Stefan Brüns
The two spi channels/controllers are available on the PI-2 resp. Euler connector, enable both. Contrary to the Pi, the A64 SOC only supports one chip select, so the second chipselect is not available (though it can be emulated using gpio chipselect). Signed-off-by: Stefan Brüns --- arch/arm64

[PATCH v2] arm64: allwinner: a64: add SPI nodes

2017-08-30 Thread Stefan Brüns
The A64 SPI controllers are register compatible to the h3/h5 SPI controllers. The A64 has two SPI controllers, each with a single chip select. The handles for the DMA channels (23/24 for SPI0/SPI1) are omitted, as the A64 DMA support is currently missing. Signed-off-by: Stefan Brüns --- v2

[PATCH 2/3] arm64: allwinner: a64: Add device node for DMA controller

2017-08-30 Thread Stefan Brüns
The A64 SoC has a DMA controller that supports 8 DMA channels to and from various peripherals. Add a device node for it. Signed-off-by: Stefan Brüns --- Documentation/devicetree/bindings/dma/sun6i-dma.txt | 1 + arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 + 2 files changed

[PATCH 0/3] dmaengine: Fix DMA on current allwinner SoCs, add A64 support

2017-08-30 Thread Stefan Brüns
and the driver. Stefan Brüns (3): dmaengine: sun6i: Correct DMA support on H3 arm64: allwinner: a64: Add device node for DMA controller dmaengine: sun6i: Add support for Allwinner A64 .../devicetree/bindings/dma/sun6i-dma.txt | 1 + arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi

[PATCH 3/3] dmaengine: sun6i: Add support for Allwinner A64

2017-08-30 Thread Stefan Brüns
The A64 SoC has the same dma engine as the H3 (sun8i), with a reduced amount of physical channels. Add the proper config data and compatible string to support it. Signed-off-by: Stefan Brüns --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 drivers/dma/sun6i-dma.c

[PATCH 1/3] dmaengine: sun6i: Correct DMA support on H3

2017-08-30 Thread Stefan Brüns
added to the config. Separating verification of the config and conversion to register values allows to keep both independent of the used controller. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c | 128 +--- 1 file changed, 88 insertions(+), 40

[PATCH v2 06/10] arm64: allwinner: a64: Add devicetree binding for DMA controller

2017-09-16 Thread Stefan Brüns
layout defined maximum of 32 is used. Signed-off-by: Stefan Brüns --- .../devicetree/bindings/dma/sun6i-dma.txt | 26 ++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i

[PATCH v2 08/10] dmaengine: sun6i: Add support for Allwinner A64 and compatibles

2017-09-16 Thread Stefan Brüns
The A64 SoC has the same dma engine as the H3 (sun8i), with a reduced amount of physical channels. To allow future reuse of the compatible, leave the channel count etc. in the config data blank and retrieve it from the devicetree. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c | 23

[PATCH v2 07/10] dmaengine: sun6i: Retrieve channel count/max request from devicetree

2017-09-16 Thread Stefan Brüns
sparse port mapping. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 245a147f718f..b5ecc97a0d5a 100644 --- a/drivers/dma/sun6i

[PATCH v2 10/10] arm64: allwinner: a64: add dma controller references to spi nodes

2017-09-16 Thread Stefan Brüns
The spi controller nodes omit the dma controller/channel references, add it. This does not yet enable DMA for SPI transfers, as the spi-sun6i driver lacks support for DMA, but always uses PIO to the FIFO. Signed-off-by: Stefan Brüns --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 1

[PATCH v2 05/10] dmaengine: sun6i: Move number of pchans/vchans/request to device struct

2017-09-16 Thread Stefan Brüns
Preparatory patch: If the same compatible is used for different SoCs which have a common register layout, but different number of channels, the channel count can no longer be stored in the config. Store it in the device structure instead. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c

[PATCH v2 01/10] dmaengine: sun6i: Correct setting of clock autogating register for A83T/H3

2017-09-16 Thread Stefan Brüns
it in the controller config structure. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index bcd496edc70f..45bcd5271d94 100644 --- a

[PATCH v2 09/10] arm64: allwinner: a64: Add device node for DMA controller

2017-09-16 Thread Stefan Brüns
The A64 SoC has a DMA controller that supports 8 DMA channels to and from various peripherals. The last used DRQ port is 27. Add a device node for it. Signed-off-by: Stefan Brüns --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH v2 02/10] dmaengine: sun6i: Correct burst length field offsets for H3

2017-09-16 Thread Stefan Brüns
: Stefan Brüns --- drivers/dma/sun6i-dma.c | 36 +++- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 45bcd5271d94..a6fc066a0ac6 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c

[PATCH v2 04/10] dmaengine: sun6i: Enable additional burst lengths/widths on H3

2017-09-16 Thread Stefan Brüns
The H3 supports bursts lengths of 1, 4, 8 and 16 transfers, each with a width of 1, 2, 4 or 8 bytes. The register value for the the width is log2-encoded, change the conversion function to provide the correct value for width == 8. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c | 54

[PATCH v2 00/10] dmaengine: sun6i: Fixes for H3/A83T, enable A64

2017-09-16 Thread Stefan Brüns
ovided in config or devicetree Stefan Brüns (10): dmaengine: sun6i: Correct setting of clock autogating register for A83T/H3 dmaengine: sun6i: Correct burst length field offsets for H3 dmaengine: sun6i: Restructure code to allow extension for new SoCs dmaengine: sun6i: Enable additio

[PATCH v2 03/10] dmaengine: sun6i: Restructure code to allow extension for new SoCs

2017-09-16 Thread Stefan Brüns
out of the conversion to distinct operations. Signed-off-by: Stefan Brüns --- drivers/dma/sun6i-dma.c | 66 - 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index a6fc066a0ac6

[PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger

2017-09-17 Thread Stefan Brüns
The driver would happily accept buswidth of 16/32/64 bytes and program garbage to its registers. Signed-off-by: Stefan Brüns --- drivers/dma/edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 3879f80a4815..c944ea339425

[RFC PATCH] dmaengine: sh: Correct src_addr_widths/dst_addr_widths bitmask setting

2017-09-17 Thread Stefan Brüns
BIT(), not BIT(log2), as it must be able to encode a width of 3 bytes. The corollary is, it is not possible to encode either a width of 32 or 64 bytes, as the field has a size of 32 bits, and only a subset of the controller capabilities can be exposed. Signed-off-by: Stefan Brüns --- drivers/dma

[PATCH 2/4] iio: light: vl6180: Avoid readback of integration time register

2017-09-18 Thread Stefan Brüns
Instead of reading the value from the register on each query, store the set value. Signed-off-by: Stefan Brüns --- drivers/iio/light/vl6180.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/iio/light/vl6180.c b/drivers/iio/light/vl6180.c index

[PATCH 3/4] iio: light: vl6180: Cleanup als_gain lookup, avoid register readback

2017-09-18 Thread Stefan Brüns
Instead of manually iterating the array of allowed gain values, use find_closest. Storing the current gain setting avoids accessing the hardware on each query. Signed-off-by: Stefan Brüns --- drivers/iio/light/vl6180.c | 85 -- 1 file changed, 44

[PATCH 4/4] iio: light: vl6180: Correct ALS scale for non-default gain/integration time

2017-09-18 Thread Stefan Brüns
The reported scale was only correct for the default settings of 100 ms integration time and gain 1. This aligns the reported scale with the behaviour of any other IIO driver and the documented ABI, but may require userspace changes if someone uses non-default settings. Signed-off-by: Stefan

[PATCH 1/4] iio: light: vl6180: Move range check to integration time setter, cleanup

2017-09-18 Thread Stefan Brüns
This improves code uniformity (range checks for als_gain are also done in the setter). Also unmangle rounding and calculation of register value. The calculated integration time it_ms is required in the next patch of the series. Signed-off-by: Stefan Brüns --- drivers/iio/light/vl6180.c | 18

[PATCH 0/4] iio: light: vl6180: Several fixes and enhancements

2017-09-18 Thread Stefan Brüns
register values. Use the saved values to report the correct scale value. Stefan Brüns (4): iio: light: vl6180: Move range check to integration time setter, cleanup iio: light: vl6180: Avoid readback of integration time register iio: light: vl6180: Cleanup als_gain lookup, avoid register readback

[PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc

2017-09-11 Thread Stefan Brüns
Commit 93c6ee94c140 ("dma: Support for 3 bytes word size") and commit 534a729866f9 ("dmaengine: Add 16 bytes, 32 bytes and 64 bytes bus widths") added additional values for the allowed word size, but omitted these from the struct dma_slave_config documentation. Signed-

  1   2   >