Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4e6fe29f
Commit
4e6fe29f
authored
Aug 30, 2017
by
Guenter Roeck
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'lee/ib-mfd-hwmon-4.14' into hwmon-next
parents
69301258
4f16cab1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
302 additions
and
26 deletions
+302
-26
drivers/hwmon/da9052-hwmon.c
drivers/hwmon/da9052-hwmon.c
+263
-22
drivers/mfd/da9052-core.c
drivers/mfd/da9052-core.c
+23
-3
include/linux/mfd/da9052/da9052.h
include/linux/mfd/da9052/da9052.h
+6
-0
include/linux/mfd/da9052/reg.h
include/linux/mfd/da9052/reg.h
+10
-1
No files found.
drivers/hwmon/da9052-hwmon.c
View file @
4e6fe29f
This diff is collapsed.
Click to expand it.
drivers/mfd/da9052-core.c
View file @
4e6fe29f
...
...
@@ -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>
...
...
@@ -518,9 +519,6 @@ static const struct mfd_cell da9052_subdev_info[] = {
{
.
name
=
"da9052-wled3"
,
},
{
.
name
=
"da9052-tsi"
,
},
{
.
name
=
"da9052-bat"
,
},
...
...
@@ -529,6 +527,10 @@ 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
,
...
...
@@ -619,9 +621,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
;
...
...
include/linux/mfd/da9052/da9052.h
View file @
4e6fe29f
...
...
@@ -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
...
...
include/linux/mfd/da9052/reg.h
View file @
4e6fe29f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment