[thermal PATCH v15 8/9] drivers: thermal: tsens: Add support for ipq8064-tsens

2021-04-20 Thread Ansuel Smith
Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index

[thermal PATCH v15 9/9] dt-bindings: thermal: tsens: Document ipq8064 bindings

2021-04-20 Thread Ansuel Smith
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.yaml | 56 --- 1 file changed, 48 insertions

[thermal PATCH v15 7/9] drivers: thermal: tsens: Drop unused define for msm8960

2021-04-20 Thread Ansuel Smith
Drop unused define for msm8960 replaced by generic api and reg_field. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b

[thermal PATCH v15 5/9] drivers: thermal: tsens: Fix bug in sensor enable for msm8960

2021-04-20 Thread Ansuel Smith
Device based on tsens VER_0 contains a hardware bug that results in some problem with sensor enablement. Sensor id 6-11 can't be enabled selectively and all of them must be enabled in one step. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c

[thermal PATCH v15 3/9] drivers: thermal: tsens: Add VER_0 tsens version

2021-04-20 Thread Ansuel Smith
VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Add support for VER_0 in tsens.c and set the right tsens feat in tsens-8960.c file. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Reported-by

[thermal PATCH v15 6/9] drivers: thermal: tsens: Replace custom 8960 apis with generic apis

2021-04-20 Thread Ansuel Smith
Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Drop custom get_temp function and use generic api. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 56

[thermal PATCH v15 4/9] drivers: thermal: tsens: Use init_common for msm8960

2021-04-20 Thread Ansuel Smith
Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 52 +-- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers

[thermal PATCH v15 2/9] drivers: thermal: tsens: Convert msm8960 to reg_field

2021-04-20 Thread Ansuel Smith
Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 73 ++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c

[thermal PATCH v15 1/9] drivers: thermal: tsens: Don't hardcode sensor slope

2021-04-20 Thread Ansuel Smith
Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom

[thermal PATCH v15 0/9] Add support for ipq8064 tsens

2021-04-20 Thread Ansuel Smith
on set_trip and set_interrupt * Fix bad get_temp function * Add missing hardcoded slope v4: * Fix compilation error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (9): drivers: thermal: tsens: Don&#x

[thermal-next PATCH 1/2] thermal: qcom: tsens: init debugfs only with successful probe

2021-04-18 Thread Ansuel Smith
calibrate and tsens_register can fail or PROBE_DEFER. This will cause a double or a wrong init of the debugfs information. Init debugfs only with successful probe fixing warning about directory already present. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens.c | 9 ++--- 1 file

[thermal-next PATCH 2/2] thermal: qcom: tsens: simplify debugfs init function

2021-04-18 Thread Ansuel Smith
Simplify debugfs init function. - Drop useless variables - Add check for existing dev directory. - Fix wrong version in dbg_version_show (with version 0.0.0, 0.1.0 was incorrectly reported) Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens.c | 16 +++- 1 file changed, 7

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Ansuel Smith
On Sun, Apr 11, 2021 at 09:50:17PM +0300, Vladimir Oltean wrote: > On Sun, Apr 11, 2021 at 08:01:35PM +0200, Marek Behun wrote: > > On Sat, 10 Apr 2021 15:34:46 +0200 > > Ansuel Smith wrote: > > > > > Hi, > > > this is a respin of the Marek series in hope t

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Ansuel Smith
On Sun, Apr 11, 2021 at 08:39:12PM +0200, Andrew Lunn wrote: > On Sun, Apr 11, 2021 at 08:01:35PM +0200, Marek Behun wrote: > > On Sat, 10 Apr 2021 15:34:46 +0200 > > Ansuel Smith wrote: > > > > > Hi, > > > this is a respin of the Marek series in hope t

Re: [PATCH RFC net-next 1/3] net: dsa: allow for multiple CPU ports

2021-04-12 Thread Ansuel Smith
On Mon, Apr 12, 2021 at 11:35:25AM +0800, DENG Qingfang wrote: > On Sat, Apr 10, 2021 at 03:34:47PM +0200, Ansuel Smith wrote: > > Allow for multiple CPU ports in a DSA switch tree. By default the first > > CPU port is assigned mimic the original assignement logic. A DSA driver &

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-11 Thread Ansuel Smith
On Sun, Apr 11, 2021 at 08:01:35PM +0200, Marek Behun wrote: > On Sat, 10 Apr 2021 15:34:46 +0200 > Ansuel Smith wrote: > > > Hi, > > this is a respin of the Marek series in hope that this time we can > > finally make some progress with dsa supporting multi-cpu port. &

[PATCH RFC net-next 2/3] net: add ndo for setting the iflink property

2021-04-11 Thread Ansuel Smith
From: Marek Behún In DSA the iflink value is used to report to which CPU port a given switch port is connected to. Since we want to support multi-CPU DSA, we want the user to be able to change this value. Add ndo_set_iflink method into the ndo strucutre to be a pair to ndo_get_iflink. Also creat

[PATCH RFC net-next 3/3] net: dsa: implement ndo_set_netlink for chaning port's CPU port

2021-04-11 Thread Ansuel Smith
-off-by: Ansuel Smith --- net/dsa/slave.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 992fcab4b552..c68dbd3ab21a 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -63,6 +63,36 @@ static int dsa_slave_get_iflink

[PATCH RFC iproute2-next] iplink: allow to change iplink value

2021-04-11 Thread Ansuel Smith
Allow to change the interface to which a given interface is linked to. This is useful in the case of multi-CPU port DSA, for changing the CPU port of a given user port. Signed-off-by: Marek Behún Cc: David Ahern Cc: Stephen Hemminger --- ip/iplink.c | 16 +--- man/man8/ip

[PATCH RFC net-next 1/3] net: dsa: allow for multiple CPU ports

2021-04-11 Thread Ansuel Smith
wan <-> eth1 There are two CPU port and the port_get_preferred assign a preference for every port: (wan port with CPU1 everything else CPU0) lan1 <-> eth0 lan2 <-> eth0 lan3 <-> eth0 lan4 <-> eth0 wan <-> eth1 Signed-off-by: Marek Behún Signed-off-by

[PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-11 Thread Ansuel Smith
half their capabilities. (qca8k and mv88e6xxx) This current series is tested with qca8k. Ansuel Smith (1): net: dsa: allow for multiple CPU ports Marek Behún (2): net: add ndo for setting the iflink property net: dsa: implement ndo_set_netlink for chaning port's CPU port include/linux/n

Re: [PATCH v2 2/2] drivers: net: dsa: qca8k: add support for multiple cpu port

2021-04-09 Thread Ansuel Smith
On Fri, Apr 09, 2021 at 11:15:37AM -0700, Florian Fainelli wrote: > > > On 4/5/2021 10:16 PM, Ansuel Smith wrote: > > On Wed, Apr 07, 2021 at 02:41:02AM +0200, Andrew Lunn wrote: > >> On Tue, Apr 06, 2021 at 06:50:40AM +0200, Ansuel Smith wrote: > >>> qca8k

Re: [PATCH v2 2/2] drivers: net: dsa: qca8k: add support for multiple cpu port

2021-04-06 Thread Ansuel Smith
On Wed, Apr 07, 2021 at 02:41:02AM +0200, Andrew Lunn wrote: > On Tue, Apr 06, 2021 at 06:50:40AM +0200, Ansuel Smith wrote: > > qca8k 83xx switch have 2 cpu ports. Rework the driver to support > > multiple cpu port. All ports can access both cpu ports by default as > >

[PATCH v2 2/2] drivers: net: dsa: qca8k: add support for multiple cpu port

2021-04-06 Thread Ansuel Smith
qca8k 83xx switch have 2 cpu ports. Rework the driver to support multiple cpu port. All ports can access both cpu ports by default as they support the same features. Signed-off-by: Ansuel Smith --- drivers/net/dsa/qca8k.c | 18 +- drivers/net/dsa/qca8k.h | 2 -- 2 files changed

[PATCH v2 1/2] include: net: add dsa_cpu_ports function

2021-04-06 Thread Ansuel Smith
In preparation for the future when dsa will support multi cpu port, dsa_cpu_ports can be useful for switch that has multiple cpu port to retrieve the cpu mask for ACL and bridge table. Signed-off-by: Ansuel Smith --- include/net/dsa.h | 12 1 file changed, 12 insertions(+) diff

[PATCH] include: net: add dsa_cpu_ports function

2021-04-06 Thread Ansuel Smith
In preparation for the future when dsa will support multi cpu port, dsa_cpu_ports can be useful for switch that has multiple cpu port to retrieve the cpu mask for ACL and bridge table. Signed-off-by: Ansuel Smith --- include/net/dsa.h | 12 1 file changed, 12 insertions(+) diff

[PATCH v14 9/9] dt-bindings: thermal: tsens: Document ipq8064 bindings

2021-04-04 Thread Ansuel Smith
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.yaml | 56 --- 1 file changed, 48 insertions

[PATCH v14 7/9] drivers: thermal: tsens: Drop unused define for msm8960

2021-04-04 Thread Ansuel Smith
Drop unused define for msm8960 replaced by generic api and reg_field. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b

[PATCH v14 8/9] drivers: thermal: tsens: Add support for ipq8064-tsens

2021-04-04 Thread Ansuel Smith
Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index

[PATCH v14 6/9] drivers: thermal: tsens: Replace custom 8960 apis with generic apis

2021-04-04 Thread Ansuel Smith
Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Drop custom get_temp function and use generic api. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 56

[PATCH v14 5/9] drivers: thermal: tsens: Fix bug in sensor enable for msm8960

2021-04-04 Thread Ansuel Smith
Device based on tsens VER_0 contains a hardware bug that results in some problem with sensor enablement. Sensor id 6-11 can't be enabled selectively and all of them must be enabled in one step. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c

[PATCH v14 4/9] drivers: thermal: tsens: Use init_common for msm8960

2021-04-04 Thread Ansuel Smith
Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 52 +-- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers

[PATCH v14 3/9] drivers: thermal: tsens: Convert msm8960 to reg_field

2021-04-04 Thread Ansuel Smith
Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 80 ++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-8960.c

[PATCH v14 1/9] drivers: thermal: tsens: Add VER_0 tsens version

2021-04-04 Thread Ansuel Smith
VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Reported-by: kernel test robot Reported-by: Dan Carpenter --- drivers/thermal/qcom/tsens.c

[PATCH v14 2/9] drivers: thermal: tsens: Don't hardcode sensor slope

2021-04-04 Thread Ansuel Smith
Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom

[PATCH v14 0/9] Add support for ipq8064 tsens

2021-04-04 Thread Ansuel Smith
_trip and set_interrupt * Use common set_trip and set_interrupt * Fix bad get_temp function * Add missing hardcoded slope v4: * Fix compilation error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (9): dr

[PATCH v13 7/9] drivers: thermal: tsens: Drop unused define for msm8960

2021-03-24 Thread Ansuel Smith
Drop unused define for msm8960 replaced by generic api and reg_field. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b

[PATCH v13 8/9] drivers: thermal: tsens: Add support for ipq8064-tsens

2021-03-24 Thread Ansuel Smith
Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index

[PATCH v13 9/9] dt-bindings: thermal: tsens: Document ipq8064 bindings

2021-03-24 Thread Ansuel Smith
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.yaml | 56 --- 1 file changed, 48 insertions

[PATCH v13 6/9] drivers: thermal: tsens: Replace custom 8960 apis with generic apis

2021-03-24 Thread Ansuel Smith
Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Drop custom get_temp function and use generic api. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 56

[PATCH v13 2/9] drivers: thermal: tsens: Don't hardcode sensor slope

2021-03-24 Thread Ansuel Smith
Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom

[PATCH v13 3/9] drivers: thermal: tsens: Convert msm8960 to reg_field

2021-03-24 Thread Ansuel Smith
Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 80 ++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-8960.c

[PATCH v13 5/9] drivers: thermal: tsens: Fix bug in sensor enable for msm8960

2021-03-24 Thread Ansuel Smith
Device based on tsens VER_0 contains a hardware bug that results in some problem with sensor enablement. Sensor id 6-11 can't be enabled selectively and all of them must be enabled in one step. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c

[PATCH v13 4/9] drivers: thermal: tsens: Use init_common for msm8960

2021-03-24 Thread Ansuel Smith
Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 52 +-- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers

[PATCH v13 1/9] drivers: thermal: tsens: Add VER_0 tsens version

2021-03-24 Thread Ansuel Smith
VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 145 --- drivers/thermal

[PATCH v13 0/9] Add support for ipq8064 tsens

2021-03-24 Thread Ansuel Smith
p and set_interrupt * Fix bad get_temp function * Add missing hardcoded slope v4: * Fix compilation error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (9): drivers: thermal: tsens: Add VER_0 tsens ve

Re: [PATCH] clang-format: Update ColumnLimit

2021-03-19 Thread Ansuel Smith
On Fri, Mar 19, 2021 at 11:42:34AM -0700, Nathan Chancellor wrote: > On Fri, Mar 19, 2021 at 07:37:14PM +0100, Ansuel Smith wrote: > > Update ColumnLimit value, changed from 80 to 100. > > > > Signed-off-by: Ansuel Smith > > --- > > .clang-format | 2 +- >

[PATCH] clang-format: Update ColumnLimit

2021-03-19 Thread Ansuel Smith
Update ColumnLimit value, changed from 80 to 100. Signed-off-by: Ansuel Smith --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index c24b147cac01..3212542df113 100644 --- a/.clang-format +++ b/.clang-format @@ -52,7 +52,7

[PATCH v12 8/9] drivers: thermal: tsens: Add support for ipq8064-tsens

2021-03-19 Thread Ansuel Smith
Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index

[PATCH v12 7/9] drivers: thermal: tsens: Drop unused define for msm8960

2021-03-19 Thread Ansuel Smith
Drop unused define for msm8960 replaced by generic api and reg_field. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b

[PATCH v12 9/9] dt-bindings: thermal: tsens: Document ipq8064 bindings

2021-03-19 Thread Ansuel Smith
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.yaml | 56 --- 1 file changed, 48 insertions

[PATCH v12 6/9] drivers: thermal: tsens: Replace custom 8960 apis with generic apis

2021-03-19 Thread Ansuel Smith
Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Drop custom get_temp function and use generic api. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 56

[PATCH v12 5/9] drivers: thermal: tsens: Fix bug in sensor enable for msm8960

2021-03-19 Thread Ansuel Smith
Device based on tsens VER_0 contains a hardware bug that results in some problem with sensor enablement. Sensor id 6-11 can't be enabled selectively and all of them must be enabled in one step. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 23 -

[PATCH v12 4/9] drivers: thermal: tsens: Use init_common for msm8960

2021-03-19 Thread Ansuel Smith
Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 52 +-- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers

[PATCH v12 3/9] drivers: thermal: tsens: Convert msm8960 to reg_field

2021-03-19 Thread Ansuel Smith
Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 80 ++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-8960.c

[PATCH v12 1/9] drivers: thermal: tsens: Add VER_0 tsens version

2021-03-19 Thread Ansuel Smith
VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 145 --- drivers/thermal

[PATCH v12 2/9] drivers: thermal: tsens: Don't hardcode sensor slope

2021-03-19 Thread Ansuel Smith
Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom

[PATCH v12 0/9] Add support for ipq8064 tsens

2021-03-19 Thread Ansuel Smith
* Fix bad get_temp function * Add missing hardcoded slope v4: * Fix compilation error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (9): drivers: thermal: tsens: Add VER_0 tsens version drivers: thermal:

Re: [PATCH v11 1/9] drivers: thermal: tsens: Add VER_0 tsens version

2021-03-19 Thread Ansuel Smith
On Fri, Mar 19, 2021 at 09:11:38AM -0400, Thara Gopinath wrote: > > > On 3/18/21 8:52 PM, Ansuel Smith wrote: > > VER_0 is used to describe device based on tsens version before v0.1. > > These device are devices based on msm8960 for example apq8064 or > > ipq806x. >

[PATCH v11 9/9] dt-bindings: thermal: tsens: Document ipq8064 bindings

2021-03-18 Thread Ansuel Smith
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.yaml | 56 --- 1 file changed, 48 insertions

[PATCH v11 8/9] drivers: thermal: tsens: Add support for ipq8064-tsens

2021-03-18 Thread Ansuel Smith
Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index

[PATCH v11 7/9] drivers: thermal: tsens: Drop unused define for msm8960

2021-03-18 Thread Ansuel Smith
Drop unused define for msm8960 replaced by generic api and reg_field. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens

[PATCH v11 3/9] drivers: thermal: tsens: Convert msm8960 to reg_field

2021-03-18 Thread Ansuel Smith
Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 80 ++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-8960.c

[PATCH v11 6/9] drivers: thermal: tsens: Replace custom 8960 apis with generic apis

2021-03-18 Thread Ansuel Smith
Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Drop custom get_temp function and use generic api. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 56

[PATCH v11 5/9] drivers: thermal: tsens: Fix bug in sensor enable for msm8960

2021-03-18 Thread Ansuel Smith
Device based on tsens VER_0 contains a hardware bug that results in some problem with sensor enablement. Sensor id 6-11 can't be enabled selectively and all of them must be enabled in one step. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 24 +-

[PATCH v11 4/9] drivers: thermal: tsens: Use init_common for msm8960

2021-03-18 Thread Ansuel Smith
Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom/tsens-8960.c | 52 +-- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers

[PATCH v11 2/9] drivers: thermal: tsens: Don't hardcode sensor slope

2021-03-18 Thread Ansuel Smith
Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath --- drivers/thermal/qcom

[PATCH v11 1/9] drivers: thermal: tsens: Add VER_0 tsens version

2021-03-18 Thread Ansuel Smith
VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens.c | 141 --- drivers/thermal/qcom/tsens.h | 4 +- 2 files

[PATCH v11 0/9] Add support for ipq8064 tsens

2021-03-18 Thread Ansuel Smith
ssing hardcoded slope v4: * Fix compilation error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (9): drivers: thermal: tsens: Add VER_0 tsens version drivers: thermal: tsens: Don't hardcode sensor slope

[PATCH v7 1/3] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

2021-03-12 Thread Ansuel Smith
Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith Tested-by: Rafał Miłecki --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v7 2/3] devicetree: nvmem: nvmem: drop $nodename restriction

2021-03-12 Thread Ansuel Smith
Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation

[PATCH v7 3/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-12 Thread Ansuel Smith
Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/mtd/partitions/nvmem-cells.yaml | 99 +++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree

Re: [PATCH v5 2/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-11 Thread Ansuel Smith
On Thu, Mar 11, 2021 at 10:32:21AM -0700, Rob Herring wrote: > On Thu, Mar 11, 2021 at 06:12:48AM +0100, Ansuel Smith wrote: > > Document nvmem-cells compatible used to treat mtd partitions as a > > nvmem provider. > > > > Signed-off-by: Ansuel Smith > > ---

[PATCH v6 3/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-11 Thread Ansuel Smith
Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith --- .../bindings/mtd/partitions/nvmem-cells.yaml | 99 +++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem

[PATCH v6 2/3] devicetree: nvmem: nvmem: drop $nodename restriction

2021-03-11 Thread Ansuel Smith
Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation

[PATCH v6 1/3] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

2021-03-11 Thread Ansuel Smith
Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd

Re: [PATCH v4 2/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-11 Thread Ansuel Smith
On Thu, Mar 11, 2021 at 07:37:13AM +0100, Rafał Miłecki wrote: > On 10.03.2021 23:47, Ansuel Smith wrote: > > On Wed, Mar 10, 2021 at 11:41:24PM +0100, Rafał Miłecki wrote: > > > See inline > > > > > > On 10.03.2021 22:08, Ansuel Smith wrote: > > > &g

[PATCH v5 3/3] devicetree: nvmem: nvmem: drop $nodename restriction

2021-03-11 Thread Ansuel Smith
Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation

[PATCH v5 2/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-11 Thread Ansuel Smith
Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith --- .../bindings/mtd/partitions/nvmem-cells.yaml | 99 +++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem

[PATCH v5 1/3] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

2021-03-11 Thread Ansuel Smith
Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd

Re: [PATCH v4 2/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-10 Thread Ansuel Smith
On Wed, Mar 10, 2021 at 11:41:24PM +0100, Rafał Miłecki wrote: > See inline > > On 10.03.2021 22:08, Ansuel Smith wrote: > > Document nvmem-cells compatible used to treat mtd partitions as a > > nvmem provider. > > > > Signed-off-by: Ansuel Smith > > ---

[PATCH v4 3/3] devicetree: nvmem: nvmem: drop $nodename restriction

2021-03-10 Thread Ansuel Smith
Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation

[PATCH v4 1/3] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

2021-03-10 Thread Ansuel Smith
Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd

[PATCH v4 2/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-10 Thread Ansuel Smith
Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith --- .../bindings/mtd/partitions/nvmem-cells.yaml | 96 +++ 1 file changed, 96 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem

[PATCH v3 2/2] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-08 Thread Ansuel Smith
Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith --- .../bindings/mtd/partitions/nvmem-cells.yaml | 105 ++ 1 file changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem

[PATCH v3 1/2] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

2021-03-08 Thread Ansuel Smith
Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith --- Depends on [PATCH] mtd: parsers: ofpart: limit parsing of deprecated DT syntax --- drivers/mtd/mtdcore.c | 3

Re: [PATCH v2 3/3] dt-bindings: mtd: Document use of nvmem-partitions compatible

2021-03-08 Thread Ansuel Smith
On Mon, Mar 08, 2021 at 10:48:32AM +0100, Rafał Miłecki wrote: > On 16.02.2021 22:26, Ansuel Smith wrote: > > Document nvmem-partitions compatible used to treat mtd partitions as a > > nvmem provider. > > I'm just wondering if "nvmem-partitions" is accurate e

Re: [PATCH v2 1/3] mtd: partitions: ofpart: skip subnodes parse with compatible

2021-03-03 Thread Ansuel Smith
On Tue, Mar 02, 2021 at 05:53:54PM +0100, Rafał Miłecki wrote: > On 16.02.2021 22:26, Ansuel Smith wrote: > > If a partitions structure is not used, parse direct subnodes as > > fixed-partitions only if a compatible is not found or is of type > > fixed-partition. A parser ca

[PATCH] arm: Enlarge IO_SPACE_LIMIT needed for some SoC

2021-02-28 Thread Ansuel Smith
Ipq8064 SoC requires larger IO_SPACE_LIMIT or second and third pci port fails to register the IO addresses and connected device doesn't work. Cc: # 4.9+ Signed-off-by: Ansuel Smith --- arch/arm/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc

[PATCH v10 6/8] drivers: thermal: tsens: Use get_temp_common for msm8960

2021-02-17 Thread Ansuel Smith
Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 56 +-- 1 file changed, 15 insertions(+), 41

[PATCH v10 8/8] dt-bindings: thermal: tsens: Document ipq8064 bindings

2021-02-17 Thread Ansuel Smith
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith --- .../bindings/thermal/qcom-tsens.yaml | 56 --- 1 file changed, 48 insertions(+), 8 deletions(-) diff

[PATCH v10 7/8] drivers: thermal: tsens: Add support for ipq8064-tsens

2021-02-17 Thread Ansuel Smith
Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 842f518fdf84..e14b90ddd0f9

[PATCH v10 5/8] drivers: thermal: tsens: Fix bug in sensor enable for msm8960

2021-02-17 Thread Ansuel Smith
It's present a hardware bug in tsens VER_0 where if sensors upper to id 6 are enabled selectively, underfined results are expected. Fix this by enabling all the remaining sensor in one step. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 19 +-- 1

[PATCH v10 2/8] drivers: thermal: tsens: Don't hardcode sensor slope

2021-02-17 Thread Ansuel Smith
Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens.c | 3 ++- 1 file

[PATCH v10 1/8] drivers: thermal: tsens: Add VER_0 tsens version

2021-02-17 Thread Ansuel Smith
VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens.c | 175 +-- drivers/thermal/qcom/tsens.h | 4 +- 2 files

[PATCH v10 0/8] Add support for ipq8064 tsens

2021-02-17 Thread Ansuel Smith
error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (8): drivers: thermal: tsens: Add VER_0 tsens version drivers: thermal: tsens: Don't hardcode sensor slope drivers: thermal: tsens: Convert

[PATCH v10 4/8] drivers: thermal: tsens: Use init_common for msm8960

2021-02-17 Thread Ansuel Smith
Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 52 +-- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c index

[PATCH v10 3/8] drivers: thermal: tsens: Convert msm8960 to reg_field

2021-02-17 Thread Ansuel Smith
Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith --- drivers/thermal/qcom/tsens-8960.c | 80 ++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom

[PATCH v2 1/3] mtd: partitions: ofpart: skip subnodes parse with compatible

2021-02-16 Thread Ansuel Smith
If a partitions structure is not used, parse direct subnodes as fixed-partitions only if a compatible is not found or is of type fixed-partition. A parser can be used directly on the subnode and subnodes should not be parsed as fixed-partitions by default. Signed-off-by: Ansuel Smith

[PATCH v2 3/3] dt-bindings: mtd: Document use of nvmem-partitions compatible

2021-02-16 Thread Ansuel Smith
Document nvmem-partitions compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith --- .../mtd/partitions/nvmem-partitions.yaml | 105 ++ 1 file changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions

  1   2   3   4   >