Commit Graph

32 Commits

Author SHA1 Message Date
Jishnu Prakash
fed05d2fd3 dt-bindings: iio: add support for calibrated bat_therm channel
Add support for calibrated bat_therm channel on charger PMICs
PM8350B and PM7325B, which has more accuracy than default bat_therm
channel.

Change-Id: Id24e187c5a83519f9913457e871429bf729d9213
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
2022-08-07 23:16:06 -07:00
Kavya Nunna
a459581244 include: dt-bindings: Add iio-property for clear soh
Add iio property for clear soh to update userspace
on first profile load.

Change-Id: I7a9c2cf886ad7da76f6156c3ac12828bf37fe78a
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-07-06 22:18:06 -07:00
Jishnu Prakash
91e72ee64e dt-bindings: iio: Update support for PM5100 ADC channels
Add scaling function for batt_therm, batt_id and usb_in_i
and update channel macros for PM5100.

Change-Id: I45d6e8b5788276dd939b60034ae7804ca8d1b73a
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2021-05-20 11:26:59 +05:30
qctecmdr
55572f84cc Merge "iio: adc: Add QCOM SPMI PMIC5 GEN3 ADC driver" 2021-04-28 17:58:46 -07:00
qctecmdr
45e179b3b1 Merge "power: smb5-lib: Add sysfs entry to enable/disable moisture detection" 2021-04-14 04:50:24 -07:00
Kavya Nunna
c19694b892 include: dt-bindings: Add iio property for moisture detection control
Add IIO property to enable and disable moisture detection from sysfs.

Change-Id: Ibefa35e55b5e2f452329b8094f2c10dda744232f
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-04-12 17:15:35 +05:30
Jishnu Prakash
9833d437a4 dt-bindings: iio: Add PMIC5 GEN3 ADC support
Add definitions for ADC channels for PMIC5 GEN3 ADC driver.
Add virtual channel definitions for PM5100, to be used
by ADC clients for PMIC5 GEN3.

Change-Id: I1180553c3ee697f994324c60ebfb4e996221108e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2021-04-07 16:04:12 +05:30
Jishnu Prakash
5edb38f5dd dt-bindings: iio: Correct PM7325B IIN channel name
Correct PM7325B IIN_FB channel name, following HW recommendation.

Change-Id: If8d0b53fd6036e20ae038d7f14e282a229f66734
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2021-03-17 15:11:09 +05:30
qctecmdr
80b988c32b Merge "dt-bindings: iio: Add ADC support for PM7325 and PM7325B" 2020-12-08 23:22:30 -08:00
Jishnu Prakash
5140c1e124 dt-bindings: iio: Add ADC support for PM7325 and PM7325B
Add virtual channel definitions for PM7325 and PM7325B for
use by their ADC clients.

Change-Id: I75ddc15f6866a56678f344f6d18062857c4fc550
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-12-03 10:21:33 +05:30
Jishnu Prakash
0e663db261 dt-bindings: iio: Add support to read ADC5 current channels
Add scaling function required to read PMIC5 current ADC channels.

Change-Id: I686296a53093e58c6ce61bdfa55ba1940fdde873
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-11-27 09:23:42 +05:30
Jishnu Prakash
90035c5969 dt-bindings: iio: Add scale function for PM2250 S3 die temp
Add scale function macro for selecting correct scale function for S3
die temp ADC channel on PM2250 V2, as the channel is mapped to the
default voltage scaling function otherwise.

Change-Id: I6c4905100a19adcc0cf9d6beb9cb3471cc4d232b
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-11-05 20:07:56 -08:00
qctecmdr
603419fc7b Merge "defconfig: Enable smb1355 in defconfig" 2020-09-22 11:24:20 -07:00
Shyam Kumar Thella
8bfdbcbc36 dt-bindings: iio: add IIO channels for smb1355 parallel charger
Add IIO channels required by smb1355 parallel charger device.

Change-Id: If13e445dd2d1ed8f90e17a43432858348b3c1c00
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
2020-09-22 15:11:07 +05:30
Guru Das Srinagesh
2828f76706 dt-bindings: iio: Add PMX65 PMIC7 ADC support
PMX65 belongs to the PMIC7 family of chips that makes use of PMK8350 to
read ADC data from their onboard channels.

Change-Id: Id0c51bc6c69568d6ea67e5067c8c81ebf6719b63
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-09-17 14:07:49 -07:00
Subbaraman Narayanamurthy
d68f7175d5 dt-bindings: iio: add smb139x IIO channels
Add SMB_TEMP, IIN_SMB and ICHG_SMB channels for both SMB139x
charge pumps that can be paired with PM8350B.

Change-Id: Ie67f308d59439a8cb2bced6e80693b101261f3cc
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-09-11 12:45:55 -07:00
Subbaraman Narayanamurthy
f086d6a2ec dt-bindings: iio: update pm8350b ADC channel list
Add PM8350B_ADC7_ICHG_FB channel to read charging current for
PM8350B. Also, update qcom,spmi-vadc.h to add ADC7_ICHG_FB and
other relevant channels that are needed for reading input and
charging current for SMB139x charger pumps along with scale
function indices.

Change-Id: I4a1b53f328e1b394063cbf951f6ff978eb96d21e
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-09-11 12:45:19 -07:00
Jishnu Prakash
55463a63db dt-bindings: iio: Add IIO channel numbers for SMB1398
Add channel IDs required for SMB1398 IIO device's channels.

Change-Id: I20192dba7d9b20f4163a4c648681d1d517e92587
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-09-06 18:09:06 +05:30
Jishnu Prakash
a1e476a841 dt-bindings: iio: Add PSY_IIO_TYPEC_ACCESSORY_MODE for SMB5
Add PSY_IIO_TYPEC_ACCESSORY_MODE for audio use case.

Change-Id: I1bea78a57479d755627e7442be03d7f92467031f
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-08-28 23:13:25 +05:30
Shyam Kumar Thella
1074012e87 dt-bindings: iio: add IIO channel IDs for QG device
Add channel IDs required for QG IIO device to dt-binding includes.

Change-Id: I02a7d8348020345025a454cfa85740ec089ac6fd
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2020-08-22 02:42:36 -07:00
Jishnu Prakash
2e61611bb3 dt-bindings: iio: Add IIO channel numbers for QPNP-SMB5 charger
Add channel IDs required for QPNP-SMB5 IIO device's channels.

Change-Id: Id323424bfe66a396decc4babf248a2688438db75
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-08-22 10:09:12 +05:30
Jishnu Prakash
6f8e695268 dt-bindings: iio: Update PMIC5 ADC support
Update scaling function numbers to match those on kernel 4.19.

Change-Id: Iefef938004bf6ad3cde454365f37f683a3680e9d
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-04-13 08:16:47 -07:00
Jishnu Prakash
2635e99701 dt-bindings: iio: Add PMIC7 ADC support
Add definitions for ADC channels and scaling function IDs for PMIC7
ADC drivers. Add virtual channel definitions per PMIC, to be used
by ADC clients for PMIC7.

Change-Id: If857612a8087b928901dc08327aea3a8f4df7b01
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2019-12-16 03:47:35 -08:00
Patrick Havelange
023e41632e dt-bindings: iio/temperature: Add thermocouple types (and doc)
This patch introduces common thermocouple types used by various
temperature sensors. Also a brief documentation explaining this
"thermocouple-type" property.

Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:21:01 +01:00
Artur Rojek
7cf74d515b dt-bindings: iio/adc: Add bindings for Ingenic JZ47xx SoCs ADC.
Add device tree bindings for the ADC controller on JZ47xx SoCs,
used by the ingenic-adc driver.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-02-09 15:39:24 +00:00
Siddartha Mohanadoss
2c8909b95b iio: adc: Update QCOM ADC license to SPDX format
Update QCOM ADC header file to SPDX format.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18 18:11:46 +01:00
Siddartha Mohanadoss
2fca585502 dt-bindings: iio: adc: Add DT binding document for PMIC5 ADC
PMIC5 ADC has support for clients to measure voltage and current
on inputs connected to the PMIC. Clients include reading voltage
phone power and on board system thermistors for thermal management.
ADC5 on certain PMIC has support to read battery current.

This change adds documentation.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-03 22:37:03 +01:00
Eugen Hristev
a591525f43 dt-bindings: iio: adc: at91-sama5d2_adc: add channel specific consumer info
Added defines for channel consumer device-tree binding

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-06-10 13:28:12 +01:00
Greg Kroah-Hartman
b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
Paul Cercueil
56ca9db862 iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs
This patch adds support for the AD5592R (spi) and AD5593R (i2c)
ADC/DAC/GPIO devices.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-10 14:29:06 +01:00
Markus Pargmann
337600fbee iio: Add binding documentation for imx25 GCQ
The documentation describes the bindings for the imx25 GCQ unit which is
essentially a generic conversion queue using the imx25 ADC.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-02-11 15:35:09 +00:00
Stanimir Varbanov
d3ba5586fa DT: iio: vadc: document dt binding
Document DT binding for Qualcomm SPMI PMIC voltage ADC
driver.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-28 18:42:00 +00:00