Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1679767 > unrolled thread
| Started by | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| First post | 2017-07-03 10:50 +0200 |
| Last post | 2017-07-18 09:10 +0200 |
| Articles | 11 — 3 participants |
Back to article view | Back to linux.kernel
[PATCHv5 0/6] DA9052 hardware monitoring improvements Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 10:50 +0200
[PATCHv5 5/6] hwmon: da9052: replace S_IRUGO with 0444 Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 10:50 +0200
Re: [PATCHv5,5/6] hwmon: da9052: replace S_IRUGO with 0444 Guenter Roeck <linux@roeck-us.net> - 2017-07-08 17:50 +0200
[PATCHv5 4/6] mfd: da9052: make touchscreen registration optional Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 10:50 +0200
Re: [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional Lee Jones <lee.jones@linaro.org> - 2017-07-17 16:40 +0200
[PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 10:50 +0200
[PATCHv5 3/6] mfd: da9052: add register details for TSI Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 10:50 +0200
Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI Lee Jones <lee.jones@linaro.org> - 2017-07-17 16:40 +0200
Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI Lee Jones <lee.jones@linaro.org> - 2017-07-17 16:40 +0200
Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-17 17:30 +0200
Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI Lee Jones <lee.jones@linaro.org> - 2017-07-18 09:10 +0200
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-03 10:50 +0200 |
| Subject | [PATCHv5 0/6] DA9052 hardware monitoring improvements |
| Message-ID | <tZ5dn-74o-5@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-03 10:50 +0200 |
| Subject | [PATCHv5 5/6] hwmon: da9052: replace S_IRUGO with 0444 |
| Message-ID | <tZ5do-74o-27@gated-at.bofh.it> |
| In reply to | #1679767 |
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
[toc] | [prev] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2017-07-08 17:50 +0200 |
| Subject | Re: [PATCHv5,5/6] hwmon: da9052: replace S_IRUGO with 0444 |
| Message-ID | <u109A-3ZX-5@gated-at.bofh.it> |
| In reply to | #1679768 |
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[] = {
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-03 10:50 +0200 |
| Subject | [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional |
| Message-ID | <tZ5dp-74o-31@gated-at.bofh.it> |
| In reply to | #1679767 |
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
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2017-07-17 16:40 +0200 |
| Subject | Re: [PATCHv5 4/6] mfd: da9052: make touchscreen registration optional |
| Message-ID | <u4flO-6ht-59@gated-at.bofh.it> |
| In reply to | #1679769 |
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
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-03 10:50 +0200 |
| Subject | [PATCHv5 1/6] mfd: da9052: fix manual ADC read after timed out read |
| Message-ID | <tZ5dp-74o-35@gated-at.bofh.it> |
| In reply to | #1679767 |
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
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-03 10:50 +0200 |
| Subject | [PATCHv5 3/6] mfd: da9052: add register details for TSI |
| Message-ID | <tZ5dp-74o-33@gated-at.bofh.it> |
| In reply to | #1679767 |
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
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2017-07-17 16:40 +0200 |
| Subject | Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI |
| Message-ID | <u4flM-6ht-1@gated-at.bofh.it> |
| In reply to | #1679772 |
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
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2017-07-17 16:40 +0200 |
| Subject | Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI |
| Message-ID | <u4flN-6ht-33@gated-at.bofh.it> |
| In reply to | #1689109 |
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
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-17 17:30 +0200 |
| Subject | Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI |
| Message-ID | <u4g8a-6OB-15@gated-at.bofh.it> |
| In reply to | #1689109 |
[Multipart message — attachments visible in raw view] — view raw
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. -- Sebastian
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2017-07-18 09:10 +0200 |
| Subject | Re: [PATCHv5 3/6] mfd: da9052: add register details for TSI |
| Message-ID | <u4uNQ-7KM-15@gated-at.bofh.it> |
| In reply to | #1689174 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web