* [PATCHv5 0/6] DA9052 hardware monitoring improvements
@ 2017-07-03 8:39 Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read Sebastian Reichel
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:39 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree, linux-hwmon, linux-input, linux-kernel,
Sebastian Reichel
Hi,
GE Healthcare's PPD [0] uses DA9053's touchscreen pins
for hardware monitoring purposes. This adds support for
the feature and fixes a bug, which came up during
stress-testing of the driver.
[0] https://patchwork.kernel.org/patch/9809681/
Changes since PATCHv4:
- split mfd changes from main hwmon patch
Changes since PATCHv3:
- use correct index in da9052_channel_is_visible()
- disable touchscreen in mfd instead of in ts driver
Changes since PATCHv2:
- switch from "diag," to "dlg," prefix
- add/use defines for accessing bits in registers
- provide more details in the comment above early exit
in touchscreen driver
- switch to da9052_group_read() to ensure MSB and LSB
are in sync
- move binding update into its own patch
- rename patch
Changes since PATCHv1:
- convert tsiref-microvolt property into proper regulator
- drop error message for timeout
- simplify da9052_channel_is_visible()
- fix checkpatch warnings
-- Sebastian
Sebastian Reichel (6):
mfd: da9052: fix manual ADC read after timed out read
dt-bindings: mfd: da9052: support TSI as ADC
mfd: da9052: add register details for TSI
mfd: da9052: make touchscreen registration optional
hwmon: da9052: replace S_IRUGO with 0444
hwmon: da9052: add support for TSI channel
.../devicetree/bindings/mfd/da9052-i2c.txt | 8 +
drivers/hwmon/da9052-hwmon.c | 285 +++++++++++++++++++--
drivers/mfd/da9052-core.c | 30 ++-
include/linux/mfd/da9052/da9052.h | 6 +
include/linux/mfd/da9052/reg.h | 11 +-
5 files changed, 314 insertions(+), 26 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read
2017-07-03 8:39 [PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel
@ 2017-07-03 8:39 ` Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 2/6] dt-bindings: mfd: da9052: support TSI as ADC Sebastian Reichel
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:39 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree, linux-hwmon, linux-input, linux-kernel,
Sebastian Reichel
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 <sebastian.reichel@collabora.co.uk>
---
drivers/mfd/da9052-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index a88c2065d8ab..977418ca9117 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -386,6 +386,8 @@ int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel)
mutex_lock(&da9052->auxadc_lock);
+ reinit_completion(&da9052->done);
+
/* Channel gets activated on enabling the Conversion bit */
mux_sel = chan_mux[channel] | DA9052_ADC_MAN_MAN_CONV;
--
2.11.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCHv5 2/6] dt-bindings: mfd: da9052: support TSI as ADC
2017-07-03 8:39 [PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read Sebastian Reichel
@ 2017-07-03 8:39 ` Sebastian Reichel
[not found] ` <20170703084003.31184-3-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2017-07-03 8:40 ` [PATCHv5 3/6] mfd: da9052: add register details for TSI Sebastian Reichel
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:39 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree, linux-hwmon, linux-input, linux-kernel,
Sebastian Reichel
DA9052 allows using the touchscreen input pins as general purpose
analogue input pin by wiring analogue inputs to X+, X-, Y+ and Y-
and providing a reference voltage at TSIREF pin.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
Documentation/devicetree/bindings/mfd/da9052-i2c.txt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
index 9554292dc6cb..57fa74e65664 100644
--- a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
+++ b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
@@ -4,6 +4,14 @@ Required properties:
- compatible : Should be "dlg,da9052", "dlg,da9053-aa",
"dlg,da9053-ab", or "dlg,da9053-bb"
+Optional properties:
+- dlg,tsi-as-adc : Boolean, if set the X+, X-, Y+, Y- touchscreen
+ input lines are used as general purpose analogue
+ input.
+- tsiref-supply: Phandle to the regulator, which provides the reference
+ voltage for the TSIREF pin. Must be provided when the
+ touchscreen pins are used for ADC purposes.
+
Sub-nodes:
- regulators : Contain the regulator nodes. The DA9052/53 regulators are
bound using their names as listed below:
--
2.11.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCHv5 3/6] mfd: da9052: add register details for TSI
2017-07-03 8:39 [PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 2/6] dt-bindings: mfd: da9052: support TSI as ADC Sebastian Reichel
@ 2017-07-03 8:40 ` Sebastian Reichel
2017-07-17 14:32 ` Lee Jones
2017-07-03 8:40 ` [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional Sebastian Reichel
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:40 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree, linux-hwmon, linux-input, linux-kernel,
Sebastian Reichel
Add register details an channels definition for using the TSI
registers in the hwmon driver.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
include/linux/mfd/da9052/da9052.h | 6 ++++++
include/linux/mfd/da9052/reg.h | 11 ++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h
index ce9230af09c2..ae5b663836d0 100644
--- a/include/linux/mfd/da9052/da9052.h
+++ b/include/linux/mfd/da9052/da9052.h
@@ -45,6 +45,12 @@
#define DA9052_ADC_TJUNC 8
#define DA9052_ADC_VBBAT 9
+/* TSI channel has its own 4 channel mux */
+#define DA9052_ADC_TSI_XP 70
+#define DA9052_ADC_TSI_XN 71
+#define DA9052_ADC_TSI_YP 72
+#define DA9052_ADC_TSI_YN 73
+
#define DA9052_IRQ_DCIN 0
#define DA9052_IRQ_VBUS 1
#define DA9052_IRQ_DCINREM 2
diff --git a/include/linux/mfd/da9052/reg.h b/include/linux/mfd/da9052/reg.h
index 5010f978725c..76780ea8849c 100644
--- a/include/linux/mfd/da9052/reg.h
+++ b/include/linux/mfd/da9052/reg.h
@@ -690,7 +690,10 @@
/* TSI CONTROL REGISTER B BITS */
#define DA9052_TSICONTB_ADCREF 0X80
#define DA9052_TSICONTB_TSIMAN 0X40
-#define DA9052_TSICONTB_TSIMUX 0X30
+#define DA9052_TSICONTB_TSIMUX_XP 0X00
+#define DA9052_TSICONTB_TSIMUX_YP 0X10
+#define DA9052_TSICONTB_TSIMUX_XN 0X20
+#define DA9052_TSICONTB_TSIMUX_YN 0X30
#define DA9052_TSICONTB_TSISEL3 0X08
#define DA9052_TSICONTB_TSISEL2 0X04
#define DA9052_TSICONTB_TSISEL1 0X02
@@ -705,8 +708,14 @@
/* TSI CO-ORDINATE LSB RESULT REGISTER BITS */
#define DA9052_TSILSB_PENDOWN 0X40
#define DA9052_TSILSB_TSIZL 0X30
+#define DA9052_TSILSB_TSIZL_SHIFT 4
+#define DA9052_TSILSB_TSIZL_BITS 2
#define DA9052_TSILSB_TSIYL 0X0C
+#define DA9052_TSILSB_TSIYL_SHIFT 2
+#define DA9052_TSILSB_TSIYL_BITS 2
#define DA9052_TSILSB_TSIXL 0X03
+#define DA9052_TSILSB_TSIXL_SHIFT 0
+#define DA9052_TSILSB_TSIXL_BITS 2
/* TSI Z MEASUREMENT MSB RESULT REGISTER BIT */
#define DA9052_TSIZMSB_TSIZM 0XFF
--
2.11.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional
2017-07-03 8:39 [PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel
` (2 preceding siblings ...)
2017-07-03 8:40 ` [PATCHv5 3/6] mfd: da9052: add register details for TSI Sebastian Reichel
@ 2017-07-03 8:40 ` Sebastian Reichel
2017-07-17 14:34 ` Lee Jones
2017-07-03 8:40 ` [PATCHv5 5/6] hwmon: da9052: replace S_IRUGO with 0444 Sebastian Reichel
[not found] ` <20170703084003.31184-1-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
5 siblings, 1 reply; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:40 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree, linux-hwmon, linux-input, linux-kernel,
Sebastian Reichel
If the touchscreen pins are used as general purpose analogue
input, the touchscreen driver should not be used. The pins
will be handled by the existing hwmon driver instead.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/mfd/da9052-core.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index 977418ca9117..a671c18381d7 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -18,6 +18,7 @@
#include <linux/mfd/core.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/property.h>
#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/pdata.h>
@@ -521,9 +522,6 @@ static const struct mfd_cell da9052_subdev_info[] = {
.name = "da9052-wled3",
},
{
- .name = "da9052-tsi",
- },
- {
.name = "da9052-bat",
},
{
@@ -531,6 +529,12 @@ static const struct mfd_cell da9052_subdev_info[] = {
},
};
+static const struct mfd_cell da9052_tsi_subdev_info[] = {
+ {
+ .name = "da9052-tsi",
+ },
+};
+
const struct regmap_config da9052_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
@@ -621,9 +625,27 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
goto err;
}
+ /*
+ * Check if touchscreen pins are used are analogue input instead
+ * of having a touchscreen connected to them. The analogue input
+ * functionality will be provided by hwmon driver (if enabled).
+ */
+ if (!device_property_read_bool(da9052->dev, "dlg,tsi-as-adc")) {
+ ret = mfd_add_devices(da9052->dev, PLATFORM_DEVID_AUTO,
+ da9052_tsi_subdev_info,
+ ARRAY_SIZE(da9052_tsi_subdev_info),
+ NULL, 0, NULL);
+ if (ret) {
+ dev_err(da9052->dev, "failed to add TSI subdev: %d\n",
+ ret);
+ goto err;
+ }
+ }
+
return 0;
err:
+ mfd_remove_devices(da9052->dev);
da9052_irq_exit(da9052);
return ret;
--
2.11.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCHv5 5/6] hwmon: da9052: replace S_IRUGO with 0444
2017-07-03 8:39 [PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel
` (3 preceding siblings ...)
2017-07-03 8:40 ` [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional Sebastian Reichel
@ 2017-07-03 8:40 ` Sebastian Reichel
2017-07-08 15:49 ` [PATCHv5,5/6] " Guenter Roeck
[not found] ` <20170703084003.31184-1-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
5 siblings, 1 reply; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:40 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree, linux-hwmon, linux-input, linux-kernel,
Sebastian Reichel
Fix checkpatch warnings about S_IRUGO being less readable than
providing the permissions octal as '0444'.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/hwmon/da9052-hwmon.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/hwmon/da9052-hwmon.c b/drivers/hwmon/da9052-hwmon.c
index c9832bfacfe5..708c91ac601f 100644
--- a/drivers/hwmon/da9052-hwmon.c
+++ b/drivers/hwmon/da9052-hwmon.c
@@ -196,43 +196,43 @@ static ssize_t show_label(struct device *dev,
input_names[to_sensor_dev_attr(devattr)->index]);
}
-static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, da9052_read_vddout, NULL,
+static SENSOR_DEVICE_ATTR(in0_input, 0444, da9052_read_vddout, NULL,
DA9052_ADC_VDDOUT);
-static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(in0_label, 0444, show_label, NULL,
DA9052_ADC_VDDOUT);
-static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, da9052_read_vbat, NULL,
+static SENSOR_DEVICE_ATTR(in3_input, 0444, da9052_read_vbat, NULL,
DA9052_ADC_VBAT);
-static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(in3_label, 0444, show_label, NULL,
DA9052_ADC_VBAT);
-static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, da9052_read_misc_channel, NULL,
+static SENSOR_DEVICE_ATTR(in4_input, 0444, da9052_read_misc_channel, NULL,
DA9052_ADC_IN4);
-static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(in4_label, 0444, show_label, NULL,
DA9052_ADC_IN4);
-static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, da9052_read_misc_channel, NULL,
+static SENSOR_DEVICE_ATTR(in5_input, 0444, da9052_read_misc_channel, NULL,
DA9052_ADC_IN5);
-static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(in5_label, 0444, show_label, NULL,
DA9052_ADC_IN5);
-static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, da9052_read_misc_channel, NULL,
+static SENSOR_DEVICE_ATTR(in6_input, 0444, da9052_read_misc_channel, NULL,
DA9052_ADC_IN6);
-static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(in6_label, 0444, show_label, NULL,
DA9052_ADC_IN6);
-static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, da9052_read_vbbat, NULL,
+static SENSOR_DEVICE_ATTR(in9_input, 0444, da9052_read_vbbat, NULL,
DA9052_ADC_VBBAT);
-static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(in9_label, 0444, show_label, NULL,
DA9052_ADC_VBBAT);
-static SENSOR_DEVICE_ATTR(curr1_input, S_IRUGO, da9052_read_ich, NULL,
+static SENSOR_DEVICE_ATTR(curr1_input, 0444, da9052_read_ich, NULL,
DA9052_ADC_ICH);
-static SENSOR_DEVICE_ATTR(curr1_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(curr1_label, 0444, show_label, NULL,
DA9052_ADC_ICH);
-static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, da9052_read_tbat, NULL,
+static SENSOR_DEVICE_ATTR(temp2_input, 0444, da9052_read_tbat, NULL,
DA9052_ADC_TBAT);
-static SENSOR_DEVICE_ATTR(temp2_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(temp2_label, 0444, show_label, NULL,
DA9052_ADC_TBAT);
-static SENSOR_DEVICE_ATTR(temp8_input, S_IRUGO, da9052_read_tjunc, NULL,
+static SENSOR_DEVICE_ATTR(temp8_input, 0444, da9052_read_tjunc, NULL,
DA9052_ADC_TJUNC);
-static SENSOR_DEVICE_ATTR(temp8_label, S_IRUGO, show_label, NULL,
+static SENSOR_DEVICE_ATTR(temp8_label, 0444, show_label, NULL,
DA9052_ADC_TJUNC);
static struct attribute *da9052_attrs[] = {
--
2.11.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCHv5 6/6] hwmon: da9052: add support for TSI channel
[not found] ` <20170703084003.31184-1-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
@ 2017-07-03 8:40 ` Sebastian Reichel
[not found] ` <20170703084003.31184-7-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-03 8:40 UTC (permalink / raw)
To: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, Guenter Roeck
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Sebastian Reichel
TSI channel has a 4 channel mux connected to it and is normally
used for touchscreen support. The hardware may alternatively
use it as general purpose adc.
Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
---
drivers/hwmon/da9052-hwmon.c | 249 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 245 insertions(+), 4 deletions(-)
diff --git a/drivers/hwmon/da9052-hwmon.c b/drivers/hwmon/da9052-hwmon.c
index 708c91ac601f..97a62f5b9ea4 100644
--- a/drivers/hwmon/da9052-hwmon.c
+++ b/drivers/hwmon/da9052-hwmon.c
@@ -20,13 +20,19 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h>
+#include <linux/regulator/consumer.h>
struct da9052_hwmon {
- struct da9052 *da9052;
- struct mutex hwmon_lock;
+ struct da9052 *da9052;
+ struct mutex hwmon_lock;
+ bool tsi_as_adc;
+ int tsiref_mv;
+ struct regulator *tsiref;
+ struct completion tsidone;
};
static const char * const input_names[] = {
@@ -37,6 +43,10 @@ static const char * const input_names[] = {
[DA9052_ADC_IN4] = "ADC IN4",
[DA9052_ADC_IN5] = "ADC IN5",
[DA9052_ADC_IN6] = "ADC IN6",
+ [DA9052_ADC_TSI_XP] = "ADC TS X+",
+ [DA9052_ADC_TSI_YP] = "ADC TS Y+",
+ [DA9052_ADC_TSI_XN] = "ADC TS X-",
+ [DA9052_ADC_TSI_YN] = "ADC TS Y-",
[DA9052_ADC_TJUNC] = "BATTERY JUNCTION TEMP",
[DA9052_ADC_VBBAT] = "BACK-UP BATTERY VOLTAGE",
};
@@ -59,6 +69,11 @@ static inline int vbbat_reg_to_mv(int value)
return DIV_ROUND_CLOSEST(value * 5000, 1023);
}
+static inline int input_tsireg_to_mv(struct da9052_hwmon *hwmon, int value)
+{
+ return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023);
+}
+
static inline int da9052_enable_vddout_channel(struct da9052 *da9052)
{
return da9052_reg_update(da9052, DA9052_ADC_CONT_REG,
@@ -154,6 +169,97 @@ static ssize_t da9052_read_misc_channel(struct device *dev,
return sprintf(buf, "%d\n", input_reg_to_mv(ret));
}
+static int da9052_request_tsi_read(struct da9052_hwmon *hwmon, int channel)
+{
+ u8 val = DA9052_TSICONTB_TSIMAN;
+
+ switch (channel) {
+ case DA9052_ADC_TSI_XP:
+ val |= DA9052_TSICONTB_TSIMUX_XP;
+ break;
+ case DA9052_ADC_TSI_YP:
+ val |= DA9052_TSICONTB_TSIMUX_YP;
+ break;
+ case DA9052_ADC_TSI_XN:
+ val |= DA9052_TSICONTB_TSIMUX_XN;
+ break;
+ case DA9052_ADC_TSI_YN:
+ val |= DA9052_TSICONTB_TSIMUX_YN;
+ break;
+ }
+
+ return da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_B_REG, val);
+}
+
+static int da9052_get_tsi_result(struct da9052_hwmon *hwmon, int channel)
+{
+ u8 regs[3];
+ int msb, lsb, err;
+
+ /* block read to avoid separation of MSB and LSB */
+ err = da9052_group_read(hwmon->da9052, DA9052_TSI_X_MSB_REG,
+ ARRAY_SIZE(regs), regs);
+ if (err)
+ return err;
+
+ switch (channel) {
+ case DA9052_ADC_TSI_XP:
+ case DA9052_ADC_TSI_XN:
+ msb = regs[0] << DA9052_TSILSB_TSIXL_BITS;
+ lsb = regs[2] & DA9052_TSILSB_TSIXL;
+ lsb >>= DA9052_TSILSB_TSIXL_SHIFT;
+ break;
+ case DA9052_ADC_TSI_YP:
+ case DA9052_ADC_TSI_YN:
+ msb = regs[1] << DA9052_TSILSB_TSIYL_BITS;
+ lsb = regs[2] & DA9052_TSILSB_TSIYL;
+ lsb >>= DA9052_TSILSB_TSIYL_SHIFT;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return msb | lsb;
+}
+
+
+static ssize_t __da9052_read_tsi(struct device *dev, int channel)
+{
+ struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
+ int ret;
+
+ reinit_completion(&hwmon->tsidone);
+
+ ret = da9052_request_tsi_read(hwmon, channel);
+ if (ret < 0)
+ return ret;
+
+ /* Wait for an conversion done interrupt */
+ if (!wait_for_completion_timeout(&hwmon->tsidone,
+ msecs_to_jiffies(500)))
+ return -ETIMEDOUT;
+
+ return da9052_get_tsi_result(hwmon, channel);
+}
+
+static ssize_t da9052_read_tsi(struct device *dev,
+ struct device_attribute *devattr,
+ char *buf)
+{
+ struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
+ int channel = to_sensor_dev_attr(devattr)->index;
+ int ret;
+
+ mutex_lock(&hwmon->hwmon_lock);
+ ret = __da9052_read_tsi(dev, channel);
+ mutex_unlock(&hwmon->hwmon_lock);
+
+ if (ret < 0)
+ return ret;
+ else
+ return sprintf(buf, "%d\n", input_tsireg_to_mv(hwmon, ret));
+}
+
static ssize_t da9052_read_tjunc(struct device *dev,
struct device_attribute *devattr, char *buf)
{
@@ -196,6 +302,28 @@ static ssize_t show_label(struct device *dev,
input_names[to_sensor_dev_attr(devattr)->index]);
}
+static umode_t da9052_channel_is_visible(struct kobject *kobj,
+ struct attribute *attr, int index)
+{
+ struct device *dev = container_of(kobj, struct device, kobj);
+ struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
+ struct device_attribute *dattr = container_of(attr,
+ struct device_attribute, attr);
+ struct sensor_device_attribute *sattr = to_sensor_dev_attr(dattr);
+
+ if (!hwmon->tsi_as_adc) {
+ switch (sattr->index) {
+ case DA9052_ADC_TSI_XP:
+ case DA9052_ADC_TSI_YP:
+ case DA9052_ADC_TSI_XN:
+ case DA9052_ADC_TSI_YN:
+ return 0;
+ }
+ }
+
+ return attr->mode;
+}
+
static SENSOR_DEVICE_ATTR(in0_input, 0444, da9052_read_vddout, NULL,
DA9052_ADC_VDDOUT);
static SENSOR_DEVICE_ATTR(in0_label, 0444, show_label, NULL,
@@ -221,6 +349,23 @@ static SENSOR_DEVICE_ATTR(in9_input, 0444, da9052_read_vbbat, NULL,
static SENSOR_DEVICE_ATTR(in9_label, 0444, show_label, NULL,
DA9052_ADC_VBBAT);
+static SENSOR_DEVICE_ATTR(in70_input, 0444, da9052_read_tsi, NULL,
+ DA9052_ADC_TSI_XP);
+static SENSOR_DEVICE_ATTR(in70_label, 0444, show_label, NULL,
+ DA9052_ADC_TSI_XP);
+static SENSOR_DEVICE_ATTR(in71_input, 0444, da9052_read_tsi, NULL,
+ DA9052_ADC_TSI_XN);
+static SENSOR_DEVICE_ATTR(in71_label, 0444, show_label, NULL,
+ DA9052_ADC_TSI_XN);
+static SENSOR_DEVICE_ATTR(in72_input, 0444, da9052_read_tsi, NULL,
+ DA9052_ADC_TSI_YP);
+static SENSOR_DEVICE_ATTR(in72_label, 0444, show_label, NULL,
+ DA9052_ADC_TSI_YP);
+static SENSOR_DEVICE_ATTR(in73_input, 0444, da9052_read_tsi, NULL,
+ DA9052_ADC_TSI_YN);
+static SENSOR_DEVICE_ATTR(in73_label, 0444, show_label, NULL,
+ DA9052_ADC_TSI_YN);
+
static SENSOR_DEVICE_ATTR(curr1_input, 0444, da9052_read_ich, NULL,
DA9052_ADC_ICH);
static SENSOR_DEVICE_ATTR(curr1_label, 0444, show_label, NULL,
@@ -246,6 +391,14 @@ static struct attribute *da9052_attrs[] = {
&sensor_dev_attr_in5_label.dev_attr.attr,
&sensor_dev_attr_in6_input.dev_attr.attr,
&sensor_dev_attr_in6_label.dev_attr.attr,
+ &sensor_dev_attr_in70_input.dev_attr.attr,
+ &sensor_dev_attr_in70_label.dev_attr.attr,
+ &sensor_dev_attr_in71_input.dev_attr.attr,
+ &sensor_dev_attr_in71_label.dev_attr.attr,
+ &sensor_dev_attr_in72_input.dev_attr.attr,
+ &sensor_dev_attr_in72_label.dev_attr.attr,
+ &sensor_dev_attr_in73_input.dev_attr.attr,
+ &sensor_dev_attr_in73_label.dev_attr.attr,
&sensor_dev_attr_in9_input.dev_attr.attr,
&sensor_dev_attr_in9_label.dev_attr.attr,
&sensor_dev_attr_curr1_input.dev_attr.attr,
@@ -257,29 +410,117 @@ static struct attribute *da9052_attrs[] = {
NULL
};
-ATTRIBUTE_GROUPS(da9052);
+static const struct attribute_group da9052_group = {
+ .attrs = da9052_attrs,
+ .is_visible = da9052_channel_is_visible,
+};
+__ATTRIBUTE_GROUPS(da9052);
+
+static irqreturn_t da9052_tsi_datardy_irq(int irq, void *data)
+{
+ struct da9052_hwmon *hwmon = data;
+
+ complete(&hwmon->tsidone);
+ return IRQ_HANDLED;
+}
static int da9052_hwmon_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct da9052_hwmon *hwmon;
struct device *hwmon_dev;
+ int err;
hwmon = devm_kzalloc(dev, sizeof(struct da9052_hwmon), GFP_KERNEL);
if (!hwmon)
return -ENOMEM;
+ platform_set_drvdata(pdev, hwmon);
+
mutex_init(&hwmon->hwmon_lock);
hwmon->da9052 = dev_get_drvdata(pdev->dev.parent);
+ init_completion(&hwmon->tsidone);
+
+ hwmon->tsi_as_adc =
+ device_property_read_bool(pdev->dev.parent, "dlg,tsi-as-adc");
+
+ if (hwmon->tsi_as_adc) {
+ hwmon->tsiref = devm_regulator_get(pdev->dev.parent, "tsiref");
+ if (IS_ERR(hwmon->tsiref)) {
+ err = PTR_ERR(hwmon->tsiref);
+ dev_err(&pdev->dev, "failed to get tsiref: %d", err);
+ return err;
+ }
+
+ err = regulator_enable(hwmon->tsiref);
+ if (err)
+ return err;
+
+ hwmon->tsiref_mv = regulator_get_voltage(hwmon->tsiref);
+ if (hwmon->tsiref_mv < 0) {
+ err = hwmon->tsiref_mv;
+ goto exit_regulator;
+ }
+
+ /* convert from microvolt (DT) to millivolt (hwmon) */
+ hwmon->tsiref_mv /= 1000;
+
+ /* TSIREF limits from datasheet */
+ if (hwmon->tsiref_mv < 1800 || hwmon->tsiref_mv > 2600) {
+ dev_err(hwmon->da9052->dev, "invalid TSIREF voltage: %d",
+ hwmon->tsiref_mv);
+ err = -ENXIO;
+ goto exit_regulator;
+ }
+
+ /* disable touchscreen features */
+ da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_A_REG, 0x00);
+
+ err = da9052_request_irq(hwmon->da9052, DA9052_IRQ_TSIREADY,
+ "tsiready-irq", da9052_tsi_datardy_irq,
+ hwmon);
+ if (err) {
+ dev_err(&pdev->dev, "Failed to register TSIRDY IRQ: %d",
+ err);
+ goto exit_regulator;
+ }
+ }
+
hwmon_dev = devm_hwmon_device_register_with_groups(dev, "da9052",
hwmon,
da9052_groups);
- return PTR_ERR_OR_ZERO(hwmon_dev);
+ err = PTR_ERR_OR_ZERO(hwmon_dev);
+ if (err)
+ goto exit_irq;
+
+ return 0;
+
+exit_irq:
+ if (hwmon->tsi_as_adc)
+ da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon);
+exit_regulator:
+ if (hwmon->tsiref)
+ regulator_disable(hwmon->tsiref);
+
+ return err;
+}
+
+static int da9052_hwmon_remove(struct platform_device *pdev)
+{
+ struct da9052_hwmon *hwmon = platform_get_drvdata(pdev);
+
+ if (hwmon->tsi_as_adc) {
+ da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon);
+ regulator_disable(hwmon->tsiref);
+ }
+
+ return 0;
}
static struct platform_driver da9052_hwmon_driver = {
.probe = da9052_hwmon_probe,
+ .remove = da9052_hwmon_remove,
.driver = {
.name = "da9052-hwmon",
},
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCHv5 2/6] dt-bindings: mfd: da9052: support TSI as ADC
[not found] ` <20170703084003.31184-3-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
@ 2017-07-07 15:52 ` Rob Herring
2017-07-17 14:31 ` Lee Jones
1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2017-07-07 15:52 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Lee Jones, Mark Rutland,
Jean Delvare, Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Mon, Jul 03, 2017 at 10:39:59AM +0200, Sebastian Reichel wrote:
> DA9052 allows using the touchscreen input pins as general purpose
> analogue input pin by wiring analogue inputs to X+, X-, Y+ and Y-
> and providing a reference voltage at TSIREF pin.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
> ---
> Documentation/devicetree/bindings/mfd/da9052-i2c.txt | 8 ++++++++
> 1 file changed, 8 insertions(+)
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5,5/6] hwmon: da9052: replace S_IRUGO with 0444
2017-07-03 8:40 ` [PATCHv5 5/6] hwmon: da9052: replace S_IRUGO with 0444 Sebastian Reichel
@ 2017-07-08 15:49 ` Guenter Roeck
0 siblings, 0 replies; 16+ messages in thread
From: Guenter Roeck @ 2017-07-08 15:49 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, devicetree, linux-hwmon, linux-input,
linux-kernel
On Mon, Jul 03, 2017 at 10:40:02AM +0200, Sebastian Reichel wrote:
> Fix checkpatch warnings about S_IRUGO being less readable than
> providing the permissions octal as '0444'.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
I would apply it directly, but it is a part of a series, so I'll hold off
to avoid confusion.
Guenter
> ---
> drivers/hwmon/da9052-hwmon.c | 36 ++++++++++++++++++------------------
> 1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/hwmon/da9052-hwmon.c b/drivers/hwmon/da9052-hwmon.c
> index c9832bfacfe5..708c91ac601f 100644
> --- a/drivers/hwmon/da9052-hwmon.c
> +++ b/drivers/hwmon/da9052-hwmon.c
> @@ -196,43 +196,43 @@ static ssize_t show_label(struct device *dev,
> input_names[to_sensor_dev_attr(devattr)->index]);
> }
>
> -static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, da9052_read_vddout, NULL,
> +static SENSOR_DEVICE_ATTR(in0_input, 0444, da9052_read_vddout, NULL,
> DA9052_ADC_VDDOUT);
> -static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(in0_label, 0444, show_label, NULL,
> DA9052_ADC_VDDOUT);
> -static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, da9052_read_vbat, NULL,
> +static SENSOR_DEVICE_ATTR(in3_input, 0444, da9052_read_vbat, NULL,
> DA9052_ADC_VBAT);
> -static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(in3_label, 0444, show_label, NULL,
> DA9052_ADC_VBAT);
> -static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, da9052_read_misc_channel, NULL,
> +static SENSOR_DEVICE_ATTR(in4_input, 0444, da9052_read_misc_channel, NULL,
> DA9052_ADC_IN4);
> -static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(in4_label, 0444, show_label, NULL,
> DA9052_ADC_IN4);
> -static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, da9052_read_misc_channel, NULL,
> +static SENSOR_DEVICE_ATTR(in5_input, 0444, da9052_read_misc_channel, NULL,
> DA9052_ADC_IN5);
> -static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(in5_label, 0444, show_label, NULL,
> DA9052_ADC_IN5);
> -static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, da9052_read_misc_channel, NULL,
> +static SENSOR_DEVICE_ATTR(in6_input, 0444, da9052_read_misc_channel, NULL,
> DA9052_ADC_IN6);
> -static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(in6_label, 0444, show_label, NULL,
> DA9052_ADC_IN6);
> -static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, da9052_read_vbbat, NULL,
> +static SENSOR_DEVICE_ATTR(in9_input, 0444, da9052_read_vbbat, NULL,
> DA9052_ADC_VBBAT);
> -static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(in9_label, 0444, show_label, NULL,
> DA9052_ADC_VBBAT);
>
> -static SENSOR_DEVICE_ATTR(curr1_input, S_IRUGO, da9052_read_ich, NULL,
> +static SENSOR_DEVICE_ATTR(curr1_input, 0444, da9052_read_ich, NULL,
> DA9052_ADC_ICH);
> -static SENSOR_DEVICE_ATTR(curr1_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(curr1_label, 0444, show_label, NULL,
> DA9052_ADC_ICH);
>
> -static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, da9052_read_tbat, NULL,
> +static SENSOR_DEVICE_ATTR(temp2_input, 0444, da9052_read_tbat, NULL,
> DA9052_ADC_TBAT);
> -static SENSOR_DEVICE_ATTR(temp2_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(temp2_label, 0444, show_label, NULL,
> DA9052_ADC_TBAT);
> -static SENSOR_DEVICE_ATTR(temp8_input, S_IRUGO, da9052_read_tjunc, NULL,
> +static SENSOR_DEVICE_ATTR(temp8_input, 0444, da9052_read_tjunc, NULL,
> DA9052_ADC_TJUNC);
> -static SENSOR_DEVICE_ATTR(temp8_label, S_IRUGO, show_label, NULL,
> +static SENSOR_DEVICE_ATTR(temp8_label, 0444, show_label, NULL,
> DA9052_ADC_TJUNC);
>
> static struct attribute *da9052_attrs[] = {
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5,6/6] hwmon: da9052: add support for TSI channel
[not found] ` <20170703084003.31184-7-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
@ 2017-07-08 15:52 ` Guenter Roeck
0 siblings, 0 replies; 16+ messages in thread
From: Guenter Roeck @ 2017-07-08 15:52 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Lee Jones, Rob Herring,
Mark Rutland, Jean Delvare, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Mon, Jul 03, 2017 at 10:40:03AM +0200, Sebastian Reichel wrote:
> TSI channel has a 4 channel mux connected to it and is normally
> used for touchscreen support. The hardware may alternatively
> use it as general purpose adc.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
Acked-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> ---
> drivers/hwmon/da9052-hwmon.c | 249 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 245 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hwmon/da9052-hwmon.c b/drivers/hwmon/da9052-hwmon.c
> index 708c91ac601f..97a62f5b9ea4 100644
> --- a/drivers/hwmon/da9052-hwmon.c
> +++ b/drivers/hwmon/da9052-hwmon.c
> @@ -20,13 +20,19 @@
> #include <linux/module.h>
> #include <linux/slab.h>
> #include <linux/platform_device.h>
> +#include <linux/property.h>
>
> #include <linux/mfd/da9052/da9052.h>
> #include <linux/mfd/da9052/reg.h>
> +#include <linux/regulator/consumer.h>
>
> struct da9052_hwmon {
> - struct da9052 *da9052;
> - struct mutex hwmon_lock;
> + struct da9052 *da9052;
> + struct mutex hwmon_lock;
> + bool tsi_as_adc;
> + int tsiref_mv;
> + struct regulator *tsiref;
> + struct completion tsidone;
> };
>
> static const char * const input_names[] = {
> @@ -37,6 +43,10 @@ static const char * const input_names[] = {
> [DA9052_ADC_IN4] = "ADC IN4",
> [DA9052_ADC_IN5] = "ADC IN5",
> [DA9052_ADC_IN6] = "ADC IN6",
> + [DA9052_ADC_TSI_XP] = "ADC TS X+",
> + [DA9052_ADC_TSI_YP] = "ADC TS Y+",
> + [DA9052_ADC_TSI_XN] = "ADC TS X-",
> + [DA9052_ADC_TSI_YN] = "ADC TS Y-",
> [DA9052_ADC_TJUNC] = "BATTERY JUNCTION TEMP",
> [DA9052_ADC_VBBAT] = "BACK-UP BATTERY VOLTAGE",
> };
> @@ -59,6 +69,11 @@ static inline int vbbat_reg_to_mv(int value)
> return DIV_ROUND_CLOSEST(value * 5000, 1023);
> }
>
> +static inline int input_tsireg_to_mv(struct da9052_hwmon *hwmon, int value)
> +{
> + return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023);
> +}
> +
> static inline int da9052_enable_vddout_channel(struct da9052 *da9052)
> {
> return da9052_reg_update(da9052, DA9052_ADC_CONT_REG,
> @@ -154,6 +169,97 @@ static ssize_t da9052_read_misc_channel(struct device *dev,
> return sprintf(buf, "%d\n", input_reg_to_mv(ret));
> }
>
> +static int da9052_request_tsi_read(struct da9052_hwmon *hwmon, int channel)
> +{
> + u8 val = DA9052_TSICONTB_TSIMAN;
> +
> + switch (channel) {
> + case DA9052_ADC_TSI_XP:
> + val |= DA9052_TSICONTB_TSIMUX_XP;
> + break;
> + case DA9052_ADC_TSI_YP:
> + val |= DA9052_TSICONTB_TSIMUX_YP;
> + break;
> + case DA9052_ADC_TSI_XN:
> + val |= DA9052_TSICONTB_TSIMUX_XN;
> + break;
> + case DA9052_ADC_TSI_YN:
> + val |= DA9052_TSICONTB_TSIMUX_YN;
> + break;
> + }
> +
> + return da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_B_REG, val);
> +}
> +
> +static int da9052_get_tsi_result(struct da9052_hwmon *hwmon, int channel)
> +{
> + u8 regs[3];
> + int msb, lsb, err;
> +
> + /* block read to avoid separation of MSB and LSB */
> + err = da9052_group_read(hwmon->da9052, DA9052_TSI_X_MSB_REG,
> + ARRAY_SIZE(regs), regs);
> + if (err)
> + return err;
> +
> + switch (channel) {
> + case DA9052_ADC_TSI_XP:
> + case DA9052_ADC_TSI_XN:
> + msb = regs[0] << DA9052_TSILSB_TSIXL_BITS;
> + lsb = regs[2] & DA9052_TSILSB_TSIXL;
> + lsb >>= DA9052_TSILSB_TSIXL_SHIFT;
> + break;
> + case DA9052_ADC_TSI_YP:
> + case DA9052_ADC_TSI_YN:
> + msb = regs[1] << DA9052_TSILSB_TSIYL_BITS;
> + lsb = regs[2] & DA9052_TSILSB_TSIYL;
> + lsb >>= DA9052_TSILSB_TSIYL_SHIFT;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + return msb | lsb;
> +}
> +
> +
> +static ssize_t __da9052_read_tsi(struct device *dev, int channel)
> +{
> + struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
> + int ret;
> +
> + reinit_completion(&hwmon->tsidone);
> +
> + ret = da9052_request_tsi_read(hwmon, channel);
> + if (ret < 0)
> + return ret;
> +
> + /* Wait for an conversion done interrupt */
> + if (!wait_for_completion_timeout(&hwmon->tsidone,
> + msecs_to_jiffies(500)))
> + return -ETIMEDOUT;
> +
> + return da9052_get_tsi_result(hwmon, channel);
> +}
> +
> +static ssize_t da9052_read_tsi(struct device *dev,
> + struct device_attribute *devattr,
> + char *buf)
> +{
> + struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
> + int channel = to_sensor_dev_attr(devattr)->index;
> + int ret;
> +
> + mutex_lock(&hwmon->hwmon_lock);
> + ret = __da9052_read_tsi(dev, channel);
> + mutex_unlock(&hwmon->hwmon_lock);
> +
> + if (ret < 0)
> + return ret;
> + else
> + return sprintf(buf, "%d\n", input_tsireg_to_mv(hwmon, ret));
> +}
> +
> static ssize_t da9052_read_tjunc(struct device *dev,
> struct device_attribute *devattr, char *buf)
> {
> @@ -196,6 +302,28 @@ static ssize_t show_label(struct device *dev,
> input_names[to_sensor_dev_attr(devattr)->index]);
> }
>
> +static umode_t da9052_channel_is_visible(struct kobject *kobj,
> + struct attribute *attr, int index)
> +{
> + struct device *dev = container_of(kobj, struct device, kobj);
> + struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
> + struct device_attribute *dattr = container_of(attr,
> + struct device_attribute, attr);
> + struct sensor_device_attribute *sattr = to_sensor_dev_attr(dattr);
> +
> + if (!hwmon->tsi_as_adc) {
> + switch (sattr->index) {
> + case DA9052_ADC_TSI_XP:
> + case DA9052_ADC_TSI_YP:
> + case DA9052_ADC_TSI_XN:
> + case DA9052_ADC_TSI_YN:
> + return 0;
> + }
> + }
> +
> + return attr->mode;
> +}
> +
> static SENSOR_DEVICE_ATTR(in0_input, 0444, da9052_read_vddout, NULL,
> DA9052_ADC_VDDOUT);
> static SENSOR_DEVICE_ATTR(in0_label, 0444, show_label, NULL,
> @@ -221,6 +349,23 @@ static SENSOR_DEVICE_ATTR(in9_input, 0444, da9052_read_vbbat, NULL,
> static SENSOR_DEVICE_ATTR(in9_label, 0444, show_label, NULL,
> DA9052_ADC_VBBAT);
>
> +static SENSOR_DEVICE_ATTR(in70_input, 0444, da9052_read_tsi, NULL,
> + DA9052_ADC_TSI_XP);
> +static SENSOR_DEVICE_ATTR(in70_label, 0444, show_label, NULL,
> + DA9052_ADC_TSI_XP);
> +static SENSOR_DEVICE_ATTR(in71_input, 0444, da9052_read_tsi, NULL,
> + DA9052_ADC_TSI_XN);
> +static SENSOR_DEVICE_ATTR(in71_label, 0444, show_label, NULL,
> + DA9052_ADC_TSI_XN);
> +static SENSOR_DEVICE_ATTR(in72_input, 0444, da9052_read_tsi, NULL,
> + DA9052_ADC_TSI_YP);
> +static SENSOR_DEVICE_ATTR(in72_label, 0444, show_label, NULL,
> + DA9052_ADC_TSI_YP);
> +static SENSOR_DEVICE_ATTR(in73_input, 0444, da9052_read_tsi, NULL,
> + DA9052_ADC_TSI_YN);
> +static SENSOR_DEVICE_ATTR(in73_label, 0444, show_label, NULL,
> + DA9052_ADC_TSI_YN);
> +
> static SENSOR_DEVICE_ATTR(curr1_input, 0444, da9052_read_ich, NULL,
> DA9052_ADC_ICH);
> static SENSOR_DEVICE_ATTR(curr1_label, 0444, show_label, NULL,
> @@ -246,6 +391,14 @@ static struct attribute *da9052_attrs[] = {
> &sensor_dev_attr_in5_label.dev_attr.attr,
> &sensor_dev_attr_in6_input.dev_attr.attr,
> &sensor_dev_attr_in6_label.dev_attr.attr,
> + &sensor_dev_attr_in70_input.dev_attr.attr,
> + &sensor_dev_attr_in70_label.dev_attr.attr,
> + &sensor_dev_attr_in71_input.dev_attr.attr,
> + &sensor_dev_attr_in71_label.dev_attr.attr,
> + &sensor_dev_attr_in72_input.dev_attr.attr,
> + &sensor_dev_attr_in72_label.dev_attr.attr,
> + &sensor_dev_attr_in73_input.dev_attr.attr,
> + &sensor_dev_attr_in73_label.dev_attr.attr,
> &sensor_dev_attr_in9_input.dev_attr.attr,
> &sensor_dev_attr_in9_label.dev_attr.attr,
> &sensor_dev_attr_curr1_input.dev_attr.attr,
> @@ -257,29 +410,117 @@ static struct attribute *da9052_attrs[] = {
> NULL
> };
>
> -ATTRIBUTE_GROUPS(da9052);
> +static const struct attribute_group da9052_group = {
> + .attrs = da9052_attrs,
> + .is_visible = da9052_channel_is_visible,
> +};
> +__ATTRIBUTE_GROUPS(da9052);
> +
> +static irqreturn_t da9052_tsi_datardy_irq(int irq, void *data)
> +{
> + struct da9052_hwmon *hwmon = data;
> +
> + complete(&hwmon->tsidone);
> + return IRQ_HANDLED;
> +}
>
> static int da9052_hwmon_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct da9052_hwmon *hwmon;
> struct device *hwmon_dev;
> + int err;
>
> hwmon = devm_kzalloc(dev, sizeof(struct da9052_hwmon), GFP_KERNEL);
> if (!hwmon)
> return -ENOMEM;
>
> + platform_set_drvdata(pdev, hwmon);
> +
> mutex_init(&hwmon->hwmon_lock);
> hwmon->da9052 = dev_get_drvdata(pdev->dev.parent);
>
> + init_completion(&hwmon->tsidone);
> +
> + hwmon->tsi_as_adc =
> + device_property_read_bool(pdev->dev.parent, "dlg,tsi-as-adc");
> +
> + if (hwmon->tsi_as_adc) {
> + hwmon->tsiref = devm_regulator_get(pdev->dev.parent, "tsiref");
> + if (IS_ERR(hwmon->tsiref)) {
> + err = PTR_ERR(hwmon->tsiref);
> + dev_err(&pdev->dev, "failed to get tsiref: %d", err);
> + return err;
> + }
> +
> + err = regulator_enable(hwmon->tsiref);
> + if (err)
> + return err;
> +
> + hwmon->tsiref_mv = regulator_get_voltage(hwmon->tsiref);
> + if (hwmon->tsiref_mv < 0) {
> + err = hwmon->tsiref_mv;
> + goto exit_regulator;
> + }
> +
> + /* convert from microvolt (DT) to millivolt (hwmon) */
> + hwmon->tsiref_mv /= 1000;
> +
> + /* TSIREF limits from datasheet */
> + if (hwmon->tsiref_mv < 1800 || hwmon->tsiref_mv > 2600) {
> + dev_err(hwmon->da9052->dev, "invalid TSIREF voltage: %d",
> + hwmon->tsiref_mv);
> + err = -ENXIO;
> + goto exit_regulator;
> + }
> +
> + /* disable touchscreen features */
> + da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_A_REG, 0x00);
> +
> + err = da9052_request_irq(hwmon->da9052, DA9052_IRQ_TSIREADY,
> + "tsiready-irq", da9052_tsi_datardy_irq,
> + hwmon);
> + if (err) {
> + dev_err(&pdev->dev, "Failed to register TSIRDY IRQ: %d",
> + err);
> + goto exit_regulator;
> + }
> + }
> +
> hwmon_dev = devm_hwmon_device_register_with_groups(dev, "da9052",
> hwmon,
> da9052_groups);
> - return PTR_ERR_OR_ZERO(hwmon_dev);
> + err = PTR_ERR_OR_ZERO(hwmon_dev);
> + if (err)
> + goto exit_irq;
> +
> + return 0;
> +
> +exit_irq:
> + if (hwmon->tsi_as_adc)
> + da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon);
> +exit_regulator:
> + if (hwmon->tsiref)
> + regulator_disable(hwmon->tsiref);
> +
> + return err;
> +}
> +
> +static int da9052_hwmon_remove(struct platform_device *pdev)
> +{
> + struct da9052_hwmon *hwmon = platform_get_drvdata(pdev);
> +
> + if (hwmon->tsi_as_adc) {
> + da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon);
> + regulator_disable(hwmon->tsiref);
> + }
> +
> + return 0;
> }
>
> static struct platform_driver da9052_hwmon_driver = {
> .probe = da9052_hwmon_probe,
> + .remove = da9052_hwmon_remove,
> .driver = {
> .name = "da9052-hwmon",
> },
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5 2/6] dt-bindings: mfd: da9052: support TSI as ADC
[not found] ` <20170703084003.31184-3-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2017-07-07 15:52 ` Rob Herring
@ 2017-07-17 14:31 ` Lee Jones
1 sibling, 0 replies; 16+ messages in thread
From: Lee Jones @ 2017-07-17 14:31 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Rob Herring, Mark Rutland,
Jean Delvare, Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Mon, 03 Jul 2017, Sebastian Reichel wrote:
> DA9052 allows using the touchscreen input pins as general purpose
> analogue input pin by wiring analogue inputs to X+, X-, Y+ and Y-
> and providing a reference voltage at TSIREF pin.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
> ---
> Documentation/devicetree/bindings/mfd/da9052-i2c.txt | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied, thanks.
> diff --git a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
> index 9554292dc6cb..57fa74e65664 100644
> --- a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
> +++ b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
> @@ -4,6 +4,14 @@ Required properties:
> - compatible : Should be "dlg,da9052", "dlg,da9053-aa",
> "dlg,da9053-ab", or "dlg,da9053-bb"
>
> +Optional properties:
> +- dlg,tsi-as-adc : Boolean, if set the X+, X-, Y+, Y- touchscreen
> + input lines are used as general purpose analogue
> + input.
> +- tsiref-supply: Phandle to the regulator, which provides the reference
> + voltage for the TSIREF pin. Must be provided when the
> + touchscreen pins are used for ADC purposes.
> +
> Sub-nodes:
> - regulators : Contain the regulator nodes. The DA9052/53 regulators are
> bound using their names as listed below:
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI
2017-07-03 8:40 ` [PATCHv5 3/6] mfd: da9052: add register details for TSI Sebastian Reichel
@ 2017-07-17 14:32 ` Lee Jones
2017-07-17 14:33 ` Lee Jones
2017-07-17 15:20 ` Sebastian Reichel
0 siblings, 2 replies; 16+ messages in thread
From: Lee Jones @ 2017-07-17 14:32 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Rob Herring, Mark Rutland,
Jean Delvare, Guenter Roeck, devicetree, linux-hwmon, linux-input,
linux-kernel
On Mon, 03 Jul 2017, Sebastian Reichel wrote:
> Add register details an channels definition for using the TSI
> registers in the hwmon driver.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
> include/linux/mfd/da9052/da9052.h | 6 ++++++
> include/linux/mfd/da9052/reg.h | 11 ++++++++++-
> 2 files changed, 16 insertions(+), 1 deletion(-)
Do other patches in this set depend on this change?
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI
2017-07-17 14:32 ` Lee Jones
@ 2017-07-17 14:33 ` Lee Jones
2017-07-17 15:20 ` Sebastian Reichel
1 sibling, 0 replies; 16+ messages in thread
From: Lee Jones @ 2017-07-17 14:33 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Rob Herring, Mark Rutland,
Jean Delvare, Guenter Roeck, devicetree, linux-hwmon, linux-input,
linux-kernel
On Mon, 17 Jul 2017, Lee Jones wrote:
> On Mon, 03 Jul 2017, Sebastian Reichel wrote:
>
> > Add register details an channels definition for using the TSI
> > registers in the hwmon driver.
> >
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> > ---
> > include/linux/mfd/da9052/da9052.h | 6 ++++++
> > include/linux/mfd/da9052/reg.h | 11 ++++++++++-
> > 2 files changed, 16 insertions(+), 1 deletion(-)
>
> Do other patches in this set depend on this change?
BTW:
For my own reference:
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional
2017-07-03 8:40 ` [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional Sebastian Reichel
@ 2017-07-17 14:34 ` Lee Jones
0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2017-07-17 14:34 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sebastian Reichel, Support Opensource, Rob Herring, Mark Rutland,
Jean Delvare, Guenter Roeck, devicetree, linux-hwmon, linux-input,
linux-kernel
On Mon, 03 Jul 2017, Sebastian Reichel wrote:
> If the touchscreen pins are used as general purpose analogue
> input, the touchscreen driver should not be used. The pins
> will be handled by the existing hwmon driver instead.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
> drivers/mfd/da9052-core.c | 28 +++++++++++++++++++++++++---
> 1 file changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
> index 977418ca9117..a671c18381d7 100644
> --- a/drivers/mfd/da9052-core.c
> +++ b/drivers/mfd/da9052-core.c
> @@ -18,6 +18,7 @@
> #include <linux/mfd/core.h>
> #include <linux/slab.h>
> #include <linux/module.h>
> +#include <linux/property.h>
>
> #include <linux/mfd/da9052/da9052.h>
> #include <linux/mfd/da9052/pdata.h>
> @@ -521,9 +522,6 @@ static const struct mfd_cell da9052_subdev_info[] = {
> .name = "da9052-wled3",
> },
> {
> - .name = "da9052-tsi",
> - },
> - {
> .name = "da9052-bat",
> },
> {
> @@ -531,6 +529,12 @@ static const struct mfd_cell da9052_subdev_info[] = {
> },
> };
>
> +static const struct mfd_cell da9052_tsi_subdev_info[] = {
> + {
> + .name = "da9052-tsi",
> + },
> +};
I normally prefer these one a single line.
Once fixed:
For my own reference:
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> const struct regmap_config da9052_regmap_config = {
> .reg_bits = 8,
> .val_bits = 8,
> @@ -621,9 +625,27 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
> goto err;
> }
>
> + /*
> + * Check if touchscreen pins are used are analogue input instead
> + * of having a touchscreen connected to them. The analogue input
> + * functionality will be provided by hwmon driver (if enabled).
> + */
> + if (!device_property_read_bool(da9052->dev, "dlg,tsi-as-adc")) {
> + ret = mfd_add_devices(da9052->dev, PLATFORM_DEVID_AUTO,
> + da9052_tsi_subdev_info,
> + ARRAY_SIZE(da9052_tsi_subdev_info),
> + NULL, 0, NULL);
> + if (ret) {
> + dev_err(da9052->dev, "failed to add TSI subdev: %d\n",
> + ret);
> + goto err;
> + }
> + }
> +
> return 0;
>
> err:
> + mfd_remove_devices(da9052->dev);
> da9052_irq_exit(da9052);
>
> return ret;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI
2017-07-17 14:32 ` Lee Jones
2017-07-17 14:33 ` Lee Jones
@ 2017-07-17 15:20 ` Sebastian Reichel
2017-07-18 7:08 ` Lee Jones
1 sibling, 1 reply; 16+ messages in thread
From: Sebastian Reichel @ 2017-07-17 15:20 UTC (permalink / raw)
To: Lee Jones
Cc: Support Opensource, Rob Herring, Mark Rutland, Jean Delvare,
Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
Hi,
On Mon, Jul 17, 2017 at 03:32:45PM +0100, Lee Jones wrote:
> On Mon, 03 Jul 2017, Sebastian Reichel wrote:
>
> > Add register details an channels definition for using the TSI
> > registers in the hwmon driver.
> >
> > Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
> > ---
> > include/linux/mfd/da9052/da9052.h | 6 ++++++
> > include/linux/mfd/da9052/reg.h | 11 ++++++++++-
> > 2 files changed, 16 insertions(+), 1 deletion(-)
>
> Do other patches in this set depend on this change?
Patch 6 has a compile-time dependency on 3 (this one) + 5
and a runtime-dependency on patch 4. My proposed merge
solution would be an immutable branch for the mfd changes,
that can be pulled by hwmon.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI
2017-07-17 15:20 ` Sebastian Reichel
@ 2017-07-18 7:08 ` Lee Jones
0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2017-07-18 7:08 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Support Opensource, Rob Herring, Mark Rutland, Jean Delvare,
Guenter Roeck, devicetree, linux-hwmon, linux-input, linux-kernel
On Mon, 17 Jul 2017, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Jul 17, 2017 at 03:32:45PM +0100, Lee Jones wrote:
> > On Mon, 03 Jul 2017, Sebastian Reichel wrote:
> >
> > > Add register details an channels definition for using the TSI
> > > registers in the hwmon driver.
> > >
> > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> > > ---
> > > include/linux/mfd/da9052/da9052.h | 6 ++++++
> > > include/linux/mfd/da9052/reg.h | 11 ++++++++++-
> > > 2 files changed, 16 insertions(+), 1 deletion(-)
> >
> > Do other patches in this set depend on this change?
>
> Patch 6 has a compile-time dependency on 3 (this one) + 5
> and a runtime-dependency on patch 4. My proposed merge
> solution would be an immutable branch for the mfd changes,
> that can be pulled by hwmon.
I'm happy to do that. Please fix patch 4 and I'll take them in.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-07-18 7:08 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 8:39 [PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read Sebastian Reichel
2017-07-03 8:39 ` [PATCHv5 2/6] dt-bindings: mfd: da9052: support TSI as ADC Sebastian Reichel
[not found] ` <20170703084003.31184-3-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2017-07-07 15:52 ` Rob Herring
2017-07-17 14:31 ` Lee Jones
2017-07-03 8:40 ` [PATCHv5 3/6] mfd: da9052: add register details for TSI Sebastian Reichel
2017-07-17 14:32 ` Lee Jones
2017-07-17 14:33 ` Lee Jones
2017-07-17 15:20 ` Sebastian Reichel
2017-07-18 7:08 ` Lee Jones
2017-07-03 8:40 ` [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional Sebastian Reichel
2017-07-17 14:34 ` Lee Jones
2017-07-03 8:40 ` [PATCHv5 5/6] hwmon: da9052: replace S_IRUGO with 0444 Sebastian Reichel
2017-07-08 15:49 ` [PATCHv5,5/6] " Guenter Roeck
[not found] ` <20170703084003.31184-1-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2017-07-03 8:40 ` [PATCHv5 6/6] hwmon: da9052: add support for TSI channel Sebastian Reichel
[not found] ` <20170703084003.31184-7-sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2017-07-08 15:52 ` [PATCHv5,6/6] " Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).