Re: [PATCH v7 25/38] iio/scmi: port driver to the new scmi_sensor_proto_ops interface

2021-03-31 Thread Cristian Marussi
Hi Jonathan On Tue, Mar 30, 2021 at 06:34:04PM +0100, Jonathan Cameron wrote: > On Tue, 30 Mar 2021 13:51:13 +0100 > Cristian Marussi wrote: > > > Hi Jonathan, > > > > On Tue, Mar 30, 2021 at 12:33:25PM +0100, Jonathan Cameron wrote: > > > On Tue, 16 Ma

[PATCH v8 25/38] iio/scmi: Port driver to the new scmi_sensor_proto_ops interface

2021-03-30 Thread Cristian Marussi
-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla v7 --> v8 - make sensor_ops NON global --- drivers/iio/common/scmi_sensors/scmi_iio.c | 100 ++--- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/drivers/iio/com

Re: [PATCH v7 25/38] iio/scmi: port driver to the new scmi_sensor_proto_ops interface

2021-03-30 Thread Cristian Marussi
Hi Jonathan, On Tue, Mar 30, 2021 at 12:33:25PM +0100, Jonathan Cameron wrote: > On Tue, 16 Mar 2021 12:48:50 + > Cristian Marussi wrote: > > > Port driver to the new SCMI Sensor interface based on protocol handles > > and common devm_get_ops(). > > > > Cc

[PATCH v8 18/38] clk: scmi: port driver to the new scmi_clk_proto_ops interface

2021-03-26 Thread Cristian Marussi
Port driver to the new SCMI Clock interface based on protocol handles and common devm_get_ops(). Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Cristian Marussi --- v7 -> v8 - renamed local clk_ops to scmi_proto_clk_ops v6 -> v7 - fixed Copyright - renamed non-static function

Re: [PATCH v7 00/38] SCMI vendor protocols and modularization

2021-03-26 Thread Cristian Marussi
On Thu, Mar 25, 2021 at 09:09:52PM -0700, Florian Fainelli wrote: > > > On 3/16/2021 5:48 AM, Cristian Marussi wrote: > > Hi all, > > > > The current SCMI implementation does not provide an interface to easily > > develop and include a custom vendor protocol im

Re: [PATCH v7 18/38] clk: scmi: port driver to the new scmi_clk_proto_ops interface

2021-03-26 Thread Cristian Marussi
On Thu, Mar 25, 2021 at 05:08:59PM -0700, Stephen Boyd wrote: > Sorry didn't notice because linux-...@vger.kernel.org wasn't Cced > Ah, sorry my bad. > Quoting Cristian Marussi (2021-03-16 05:48:43) > > Port driver to the new SCMI Clock interface based on protoc

Re: [PATCH v7 25/38] iio/scmi: port driver to the new scmi_sensor_proto_ops interface

2021-03-16 Thread Cristian Marussi
27 314546618368.00 -3144 -3135 -3126 314647052288.00 ^CCaught signal 2 Disabling: in_accel_x_en Disabling: in_accel_z_en Disabling: in_timestamp_en Disabling: in_accel_y_en > Thanks, > Jyoti > > On Tue, Mar 16, 2021 at 5:50 AM Cristian Marussi > wrote: > > > > Port

Re: [PATCH v7 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-03-16 Thread Cristian Marussi
Hi I reposted my series on top of the take3 immutable branch from Jonathan at: https://lore.kernel.org/lkml/20210316124903.35011-1-cristian.maru...@arm.com/T/#t You should have received an email regarding the relevant IIO SCMI patch v7-0025-iio-scmi-port-driver-to-the-new-scmi_sensor_proto.patc

[PATCH v7 34/38] firmware: arm_scmi: cleanup events registration transient code

2021-03-16 Thread Cristian Marussi
Remove all the events registration code used to ease the transition to the new interface based on protocol handles.. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/base.c| 4 ++-- drivers/firmware/arm_scmi/notify.h | 6 +++--- drivers/firmware/arm_scmi/perf.c| 9

[PATCH v7 38/38] firmware: arm_scmi: add dynamic scmi devices creation

2021-03-16 Thread Cristian Marussi
long as the requested underlying protocol is defined in the DT. Signed-off-by: Cristian Marussi --- v6 --> v7 - renamed non-static function to fit scmi__ naming pattern v4 --> v5 - using klist instead of custom lists v3 --> v4 - add a few comments --- drivers/firmware/arm_scmi/bus.c

[PATCH v7 37/38] firmware: arm_scmi: add protocol modularization support

2021-03-16 Thread Cristian Marussi
Extend SCMI protocols accounting mechanism to address possible module usage and add the support to possibly define new protocols as loadable modules. Keep Standard protocols built into the SCMI core. Signed-off-by: Cristian Marussi --- v6 --> v7 - rename used IDR scmi_available_protoc

[PATCH v7 36/38] firmware: arm_scmi: rename non devres notify_ops

2021-03-16 Thread Cristian Marussi
Rename non devres managed notify_ops to use a naming pattern which exposes the performed action verb as last token. No functional change. Signed-off-by: Cristian Marussi --- v6 --> v7 - renamed non-static function to fit scmi__ naming pattern --- drivers/firmware/arm_scmi/notify.c |

[PATCH v7 33/38] firmware: arm_scmi: cleanup unused core xfer wrappers

2021-03-16 Thread Cristian Marussi
Remove unused core scmi_xfer wrappers now that we have migrated all protocols to the new interface based on protocol handles. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/common.h | 15 - drivers/firmware/arm_scmi/driver.c | 91 -- 2 files

[PATCH v7 35/38] firmware: arm_scmi: make notify_priv really private

2021-03-16 Thread Cristian Marussi
ted helpers. Signed-off-by: Cristian Marussi --- v6 --> v7 - renamed non-static function to fit scmi__ naming pattern --- drivers/firmware/arm_scmi/common.h | 4 +++ drivers/firmware/arm_scmi/driver.c | 21 ++ drivers/firmware/arm_scmi/notify.c | 45 ++ i

[PATCH v7 32/38] firmware: arm_scmi: cleanup legacy protocol init code

2021-03-16 Thread Cristian Marussi
Now that all protocols and drivers have been ported to the new interface based on protocol handles and get/put operations, remove all the legacy transient initialization code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/bus.c| 26 +- drivers

[PATCH v7 31/38] firmware: arm_scmi: make references to handle const

2021-03-16 Thread Cristian Marussi
Now that all the protocol private variable data have been moved out of struct scmi_handle, mark all of its references as const. Signed-off-by: Cristian Marussi --- v6 --> v7 - reworks to fit into refactored scmi_get_protocol_instance() --- drivers/firmware/arm_scmi/common.h | 4 ++-- driv

[PATCH v7 30/38] firmware: arm_scmi: remove legacy scmi_voltage_ops protocol interface

2021-03-16 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/voltage.c | 67 - include/linux/scmi_protocol.h | 16 --- 2

[PATCH v7 29/38] regulator: scmi: port driver to the new scmi_voltage_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Voltage interface based on protocol handles and common devm_get_ops(). Cc: Mark Brown Acked-by: Mark Brown Signed-off-by: Cristian Marussi --- v6 -> v7 - fixed Copyright v4 --> v5 - using renamed devm_get/put_protocol --- drivers/regulator/scmi-regulator.

[PATCH v7 28/38] firmware: arm_scmi: port Voltage protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/voltage.c | 179 ++-- include/linux/scmi_protocol.h | 24 ++-- 2 files changed, 136 insertions(+), 67 deletions(-) diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c

[PATCH v7 27/38] firmware: arm_scmi: port SystemPower protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations. Remove handle->system_priv now unused. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/system.c |

[PATCH v7 26/38] firmware: arm_scmi: remove legacy scmi_sensor_ops protocol interface

2021-03-16 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/sensors.c | 82 - include/linux/scmi_protocol.h | 19 --- 2

[PATCH v7 25/38] iio/scmi: port driver to the new scmi_sensor_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Sensor interface based on protocol handles and common devm_get_ops(). Cc: Jyoti Bhayana Cc: Jonathan Cameron Signed-off-by: Cristian Marussi --- drivers/iio/common/scmi_sensors/scmi_iio.c | 91 ++ 1 file changed, 41 insertions(+), 50 deletions

[PATCH v7 24/38] hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Sensor interface based on protocol handles and common devm_get_ops(). Cc: Guenter Roeck Cc: Jean Delvare Acked-by: Guenter Roeck Signed-off-by: Cristian Marussi --- v6 -> v7 - fixed Copyright - renamed non-static function to fit scmi__ naming pattern v4 --&

[PATCH v7 22/38] firmware: arm_scmi: remove legacy scmi_reset_ops protocol interface

2021-03-16 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/reset.c | 68 --- include/linux/scmi_protocol.h | 11 - 2 files

[PATCH v7 23/38] firmware: arm_scmi: port Sensor protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
ed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/sensors.c | 275 ++-- include/linux/scmi_protocol.h | 22 ++- 2 files changed, 194 insertions(+), 103 deletions(-) diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c

[PATCH v7 19/38] firmware: arm_scmi: remove legacy scmi_clk_ops protocol interface

2021-03-16 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/clock.c | 67 --- include/linux/scmi_protocol.h | 15 --- 2 files

[PATCH v7 21/38] reset: reset-scmi: port driver to the new scmi_reset_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Reset interface based on protocol handles and common devm_get_ops(). Cc: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Cristian Marussi --- v6 -> v7 - fixed Copyright - renamed non-static function to fit scmi__ naming pattern v4 --> v5 - using r

[PATCH v7 20/38] firmware: arm_scmi: port Reset protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
ed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/reset.c | 172 +- include/linux/scmi_protocol.h | 14 ++- 2 files changed, 129 insertions(+), 57 deletions(-) diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index 572dc1

[PATCH v7 18/38] clk: scmi: port driver to the new scmi_clk_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Clock interface based on protocol handles and common devm_get_ops(). Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Cristian Marussi --- v6 -> v7 - fixed Copyright - renamed non-static function to fit scmi__ naming pattern v4 --> v5 - using renamed de

[PATCH v7 15/38] firmware: arm_scmi: port GenPD driver to the new scmi_power_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Power interface based on protocol handles and common devm_get_ops(). Signed-off-by: Cristian Marussi --- v6 -> v7 - fixed Copyrigths - renamed non-static function to fit scmi__ naming pattern v4 --> v5 - using renamed devm_get/put_protocol --- drivers/fi

[PATCH v7 16/38] firmware: arm_scmi: remove legacy scmi_power_ops protocol interface

2021-03-16 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/power.c | 47 --- include/linux/scmi_protocol.h | 11 2 files

[PATCH v7 13/38] firmware: arm_scmi: remove legacy scmi_perf_ops protocol interface

2021-03-16 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/perf.c | 120 --- include/linux/scmi_protocol.h| 27 --- 2 files

[PATCH v7 17/38] firmware: arm_scmi: port Clock protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
off-by: Cristian Marussi --- drivers/firmware/arm_scmi/clock.c | 182 -- include/linux/scmi_protocol.h | 20 +++- 2 files changed, 139 insertions(+), 63 deletions(-) diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c index 2312e8

[PATCH v7 14/38] firmware: arm_scmi: port Power protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
ed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/power.c | 141 +++--- include/linux/scmi_protocol.h | 20 +++-- 2 files changed, 105 insertions(+), 56 deletions(-) diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index 5f43c4

[PATCH v7 11/38] firmware: arm_scmi: port Perf protocol to new protocols interface

2021-03-16 Thread Cristian Marussi
off-by: Cristian Marussi --- drivers/firmware/arm_scmi/perf.c | 349 --- include/linux/scmi_protocol.h| 30 ++- 2 files changed, 258 insertions(+), 121 deletions(-) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 6e37a6

[PATCH v7 12/38] cpufreq: scmi: port driver to the new scmi_perf_proto_ops interface

2021-03-16 Thread Cristian Marussi
Port driver to the new SCMI Perf interface based on protocol handles and common devm_get_ops(). Cc: Rafael J. Wysocki Cc: Viresh Kumar Acked-by: Viresh Kumar Signed-off-by: Cristian Marussi --- v6 -> v7 - fixed Copyright - reworked on top of recent cpufreq changes: dac7a57d2a89 s

[PATCH v7 09/38] firmware: arm_scmi: add helper to access revision area memory

2021-03-16 Thread Cristian Marussi
Add an helper to grab, from a protocol handle, the handle common memory area allocated to store SCMI version data which is exposed on sysfs. Such helper will be needed by SCMI Base protocol initialization once it will be moved to new protocol handles scheme. Signed-off-by: Cristian Marussi

[PATCH v7 10/38] firmware: arm_scmi: port Base protocol to new interface

2021-03-16 Thread Cristian Marussi
Port Base protocol to new protocol handles based interface. Signed-off-by: Cristian Marussi --- v6 --> v7 - renamed non-static function to fit scmi__ naming pattern --- drivers/firmware/arm_scmi/base.c | 117 +++-- drivers/firmware/arm_scmi/common.h | 3 +- driv

[PATCH v7 08/38] firmware: arm_scmi: add new protocol handle core xfer ops

2021-03-16 Thread Cristian Marussi
protocol migration. In order to support such migration the above wrappers and some additional transient code is also introduced in this commit: it will be later removed as a whole once the full migration of protocols and SCMI drivers will have been completed. Signed-off-by: Cristian Marussi --- An

[PATCH v7 07/38] firmware: arm_scmi: convert events registration to protocol handles

2021-03-16 Thread Cristian Marussi
to ease such transition. Signed-off-by: Cristian Marussi --- In particular void* argument typing will be reverted later on once all the protocols have been ported. v6 --> v7 - reworks to fit into refactored scmi_get_protocol_instance() --- drivers/firmware/arm_scmi/base.c| 4 ++-- driv

[PATCH v7 06/38] firmware: arm_scmi: refactor events registration

2021-03-16 Thread Cristian Marussi
the legacy protocol init routines. Signed-off-by: Cristian Marussi --- v6 --> v7 - reworks to fit into refactored scmi_get_protocol_instance() - check, warn and ignore scmi_register_protocol_events errors - fixed Copyright --- drivers/firmware/arm_scmi/base.c| 15 +++-- drivers/firmw

[PATCH v7 05/38] firmware: arm_scmi: introduce new devres notification ops

2021-03-16 Thread Cristian Marussi
Expose to the SCMI drivers a new alternative devres managed notifications API based on protocol handles. All drivers still keep using the old API, no functional change. Signed-off-by: Cristian Marussi --- v6 --> v7 - constify src_id parameter - renamed non-static function to fit scmi__ nam

[PATCH v7 04/38] firmware: arm_scmi: make notifications aware of protocols users

2021-03-16 Thread Cristian Marussi
Account for any active registered notifier against the proper related protocol; do not consider pending event handlers, only active handlers will concur to protocol usage accounting. Signed-off-by: Cristian Marussi --- v6 --> v7 - renamed non-static function to fit scmi__ naming patt

[PATCH v7 03/38] firmware: arm_scmi: introduce devres get/put protocols operations

2021-03-16 Thread Cristian Marussi
Expose to the SCMI drivers a new devres managed common protocols API based on generic get/put methods and protocol handles. All drivers still keep using the old API, no functional change. Signed-off-by: Cristian Marussi --- v6 --> v7 - renamed non-static function to fit scmi__ naming pattern

[PATCH v7 02/38] firmware: arm_scmi: introduce protocol handle definitions

2021-03-16 Thread Cristian Marussi
probing is still based on the old interface, so no functional change. Signed-off-by: Cristian Marussi --- v6 --> v7 - reworks to fit into refactored scmi_get_protocol_instance() --- drivers/firmware/arm_scmi/common.h | 59 ++ drivers/firmware/arm_scmi/driver.c |

[PATCH v7 01/38] firmware: arm_scmi: review protocol registration interface

2021-03-16 Thread Cristian Marussi
while keeping them all still using the usual initialization logic bound to SCMI devices probing. Signed-off-by: Cristian Marussi --- v6 --> v7 - fixed Copyrights - reverted to scmi_protocols IDR naming - fixed pr_* (.init()/GOT ==> init/Found) - fixed checkpatch complaint about macros duplic

[PATCH v7 00/38] SCMI vendor protocols and modularization

2021-03-16 Thread Cristian Marussi
m_ variant for protocols operations - made all scmi_protocol refs const - introduced IDR to handle protocols instead of static array - refactored code around fast path [1]:https://gitlab.arm.com/linux-arm/linux-cm/-/commits/scmi_modules_ext_V7/ [2]:https://git.kernel.org/pub/scm/linux/kernel/git/s

Re: [PATCH v6 37/37] firmware: arm_scmi: add dynamic scmi devices creation

2021-03-15 Thread Cristian Marussi
Hi On Mon, Mar 15, 2021 at 08:33:27AM +, Sudeep Holla wrote: > Hi Cristian, > > Sorry for the delay. > No worries. > On Tue, Feb 02, 2021 at 10:15:55PM +, Cristian Marussi wrote: > > Having added the support for SCMI protocols as modules in order to let > &

Re: [PATCH v7 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-03-12 Thread Cristian Marussi
Hi Jonathan, thanks for this, I was starting working on top of this new immutable branch BUT I spotted a thing that I wanted to check. You latest immutable: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/log/?h=ib-iio-scmi-5.12-rc2 looking at the code in the SCMI IIO Jyoti drive

Re: [PATCH v6 19/37] clk: scmi: port driver to the new scmi_clk_proto_ops interface

2021-03-10 Thread Cristian Marussi
:37PM +, Cristian Marussi wrote: > Port driver to the new SCMI Clock interface based on protocol handles > and common devm_get_ops(). > > Cc: Michael Turquette > Cc: Stephen Boyd > Signed-off-by: Cristian Marussi > --- > v4 --> v5 > - using renamed devm_get/put

Re: [PATCH v6 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-03-09 Thread Cristian Marussi
Hi Jonathan, On Tue, Mar 09, 2021 at 10:27:01AM +, Jonathan Cameron wrote: > On Tue, 9 Mar 2021 07:38:13 + > Cristian Marussi wrote: > > > Hi > > > > On Tue, Mar 09, 2021 at 06:37:27AM +, Sudeep Holla wrote: > > > On Mon, Mar 08, 2021 at 07:4

Re: [PATCH v6 36/37] firmware: arm_scmi: add protocol modularization support

2021-03-09 Thread Cristian Marussi
Hi Sudeep, On Mon, Mar 08, 2021 at 07:34:25AM +, Sudeep Holla wrote: > On Tue, Feb 02, 2021 at 10:15:54PM +0000, Cristian Marussi wrote: > > Extend SCMI protocols accounting mechanism to address possible module > > usage and add the support to possibly define new protoc

Re: [PATCH v6 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-03-08 Thread Cristian Marussi
Hi On Tue, Mar 09, 2021 at 06:37:27AM +, Sudeep Holla wrote: > On Mon, Mar 08, 2021 at 07:48:41PM +, Jonathan Cameron wrote: > > On Mon, 8 Mar 2021 04:28:42 + > > Sudeep Holla wrote: > > > > > Hi Jonathan, > > > > > > On Tue, Feb 23, 2021 at 10:30:37AM -0800, Jyoti Bhayana wrote: > >

Re: [PATCH v6 35/37] firmware: arm_scmi: make notify_priv really private

2021-03-08 Thread Cristian Marussi
On Mon, Mar 08, 2021 at 06:12:29AM +, Sudeep Holla wrote: > On Tue, Feb 02, 2021 at 10:15:53PM +0000, Cristian Marussi wrote: > > Notification private data is currently accessible via handle->notify_priv; > > this data was indeed meant to be private to the notification core s

Re: [PATCH v6 02/37] firmware: arm_scmi: introduce protocol handle definitions

2021-03-08 Thread Cristian Marussi
On Mon, Mar 08, 2021 at 05:50:30AM +, Sudeep Holla wrote: > On Tue, Feb 02, 2021 at 10:15:20PM +0000, Cristian Marussi wrote: > > Add basic protocol handles definitions and private data helpers support. > > > > A protocol handle identifies a protocol instance

Re: [PATCH v6 01/37] firmware: arm_scmi: review protocol registration interface

2021-03-08 Thread Cristian Marussi
Hi Sudeep, thanks for reviewing this. On Mon, Mar 08, 2021 at 04:38:30AM +, Sudeep Holla wrote: > On Tue, Feb 02, 2021 at 10:15:19PM +0000, Cristian Marussi wrote: > > Extend common protocol registration routines and provide some new generic > > protocols get/put helpers

Re: [PATCH] regulator: add missing call to of_node_put()

2021-02-25 Thread Cristian Marussi
Hi, thanks for reporting this, you're right but you've missed the braces around the if block in your patch, because we really want to exit only on -ENOMEM. Something like: if (ret == -ENOMEM) { of_node_put(child); return ret; } Regards, Cristian

Re: [PATCH v5 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-02-16 Thread Cristian Marussi
e same v5.13 but as distinct patches. (so you can still backport yours on v5.4 as you're doing now.) Thanks Cristian > > Thanks, > Jyoti > > On Mon, Feb 15, 2021 at 6:48 AM Cristian Marussi > wrote: > > > On Mon, Feb 15, 2021 at 11:07:56AM +, Jonathan C

Re: [PATCH v5 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-02-15 Thread Cristian Marussi
On Mon, Feb 15, 2021 at 11:07:56AM +, Jonathan Cameron wrote: > On Mon, 15 Feb 2021 09:25:26 + > Cristian Marussi wrote: > > > On Fri, Feb 12, 2021 at 07:18:58PM +, Jonathan Cameron wrote: > > > On Wed, 10 Feb 2021 21:46:19 +0000 > > > Cristian Ma

Re: [PATCH v5 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-02-15 Thread Cristian Marussi
On Fri, Feb 12, 2021 at 07:18:58PM +, Jonathan Cameron wrote: > On Wed, 10 Feb 2021 21:46:19 + > Cristian Marussi wrote: > > > Hi Jyoti, > > > > On Wed, Feb 10, 2021 at 11:19:35AM -0800, Jyoti Bhayana wrote: > > > Hi Cristian, > > > > &g

Re: [PATCH v5 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-02-10 Thread Cristian Marussi
eneral moving registration to the probe phase (which should be fine by the spec) poses any kind of problem. (and that's reason why asked it) Hope to have been clear despite the flood of words :D Thanks Cristian > > Thanks, > Jyoti > > On Tue, Feb 9, 2021 at 3:56 AM Cristian M

Re: [PATCH v5 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors

2021-02-09 Thread Cristian Marussi
Hi Jyoti some minor things down below. Other than that, FWIW about the SCMI side of this: Reviewed-by: Cristian Marussi Thanks Cristian On Mon, Feb 08, 2021 at 09:19:18PM +, Jyoti Bhayana wrote: > This change provides ARM SCMI Protocol based IIO device. > This driver provides s

[PATCH v5 0/3] Introduce SCMI System Power Control driver

2021-02-04 Thread Cristian Marussi
SCMI System Power Protocol series now merged Cristian Marussi (3): firmware: arm_scmi: support only one single SystemPower device firmware: arm_scmi: add System Power utility macro firmware: arm_scmi: add SCMI System Power Control driver drivers/firmware/Kconfig | 1

[PATCH v5 2/3] firmware: arm_scmi: add System Power utility macro

2021-02-04 Thread Cristian Marussi
Add a trivial macro to check the kind of SCMI SystemPower request. Signed-off-by: Cristian Marussi --- include/linux/scmi_protocol.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index fb8c8f16a49b..ecc14251a547 100644 --- a

[PATCH v5 1/3] firmware: arm_scmi: support only one single SystemPower device

2021-02-04 Thread Cristian Marussi
system tries to register different SystemPower devices from multiple platforms. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/bus.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c

[PATCH v5 3/3] firmware: arm_scmi: add SCMI System Power Control driver

2021-02-04 Thread Cristian Marussi
Graceful requests are relayed to userspace using the same Kernel API used to handle ACPI Shutdown bus events. Signed-off-by: Cristian Marussi --- v4 --> v5 - rebased on SCMI Modules v5 series to use new SCMI protocols interface - removed signal based shutdown/reboot - removed all module parameters -

Re: [PATCH v6 29/37] regulator: scmi: port driver to the new scmi_voltage_proto_ops interface

2021-02-03 Thread Cristian Marussi
Hi Mark On Wed, Feb 03, 2021 at 01:24:32PM +, Mark Brown wrote: > On Tue, Feb 02, 2021 at 10:15:47PM +0000, Cristian Marussi wrote: > > Port driver to the new SCMI Voltage interface based on protocol handles > > and common devm_get_ops(). > > I have no cover letter or o

Re: [PATCH v6 13/37] cpufreq: scmi: port driver to the new scmi_perf_proto_ops interface

2021-02-03 Thread Cristian Marussi
Hi Viresh On Wed, Feb 03, 2021 at 08:33:45AM +0530, Viresh Kumar wrote: > On 02-02-21, 22:15, Cristian Marussi wrote: > > Port driver to the new SCMI Perf interface based on protocol handles > > and common devm_get_ops(). > > > > Cc: Rafael J. Wysocki > > Cc

[PATCH v6 24/37] firmware: arm_scmi: port Sensor protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
ed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/sensors.c | 275 ++-- include/linux/scmi_protocol.h | 22 ++- 2 files changed, 194 insertions(+), 103 deletions(-) diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c

[PATCH v6 21/37] firmware: arm_scmi: port Reset protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
ed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/reset.c | 172 +- include/linux/scmi_protocol.h | 14 ++- 2 files changed, 129 insertions(+), 57 deletions(-) diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index 7047e5

[PATCH v6 27/37] firmware: arm_scmi: port SystemPower protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations. Remove handle->system_priv now unused. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/system.c |

[PATCH v6 29/37] regulator: scmi: port driver to the new scmi_voltage_proto_ops interface

2021-02-02 Thread Cristian Marussi
Port driver to the new SCMI Voltage interface based on protocol handles and common devm_get_ops(). Cc: Mark Brown Signed-off-by: Cristian Marussi --- v4 --> v5 - using renamed devm_get/put_protocol --- drivers/regulator/scmi-regulator.c | 40 -- 1 file changed,

[PATCH v6 32/37] firmware: arm_scmi: cleanup legacy protocol init code

2021-02-02 Thread Cristian Marussi
Now that all protocols and drivers have been ported to the new interface based on protocol handles and get/put operations, remove all the legacy transient initialization code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/bus.c| 26 +- drivers

[PATCH v6 33/37] firmware: arm_scmi: cleanup unused core xfer wrappers

2021-02-02 Thread Cristian Marussi
Remove unused core scmi_xfer wrappers now that we have migrated all protocols to the new interface based on protocol handles. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/common.h | 15 - drivers/firmware/arm_scmi/driver.c | 91 -- 2 files

[PATCH v6 37/37] firmware: arm_scmi: add dynamic scmi devices creation

2021-02-02 Thread Cristian Marussi
long as the requested underlying protocol is defined in the DT. Signed-off-by: Cristian Marussi --- v4 --> v5 - using klist instead of custom lists v3 --> v4 - add a few comments --- drivers/firmware/arm_scmi/bus.c| 30 +++ drivers/firmware/arm_scmi/common.h | 5 + drivers/fi

[PATCH v6 36/37] firmware: arm_scmi: add protocol modularization support

2021-02-02 Thread Cristian Marussi
Extend SCMI protocols accounting mechanism to address possible module usage and add the support to possibly define new protocols as loadable modules. Keep Standard protocols built into the SCMI core. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/base.c| 2 ++ drivers

[PATCH v6 35/37] firmware: arm_scmi: make notify_priv really private

2021-02-02 Thread Cristian Marussi
ted helpers. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/common.h | 4 +++ drivers/firmware/arm_scmi/driver.c | 21 ++ drivers/firmware/arm_scmi/notify.c | 45 ++ include/linux/scmi_protocol.h | 3 -- 4 files changed, 40 insertions(+),

[PATCH v6 26/37] firmware: arm_scmi: remove legacy scmi_sensor_ops protocol interface

2021-02-02 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/sensors.c | 82 - include/linux/scmi_protocol.h | 19 --- 2

[PATCH v6 15/37] firmware: arm_scmi: port Power protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
ed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/power.c | 141 +++--- include/linux/scmi_protocol.h | 20 +++-- 2 files changed, 105 insertions(+), 56 deletions(-) diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index e4c084

[PATCH v6 17/37] firmware: arm_scmi: remove legacy scmi_power_ops protocol interface

2021-02-02 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/power.c | 47 --- include/linux/scmi_protocol.h | 11 2 files

[PATCH v6 31/37] firmware: arm_scmi: make references to handle const

2021-02-02 Thread Cristian Marussi
Now that all the protocol private variable data have been moved out of struct scmi_handle, mark all of its references as const. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/common.h | 4 ++-- drivers/firmware/arm_scmi/driver.c | 8 2 files changed, 6 insertions(+), 6

[PATCH v6 23/37] firmware: arm_scmi: remove legacy scmi_reset_ops protocol interface

2021-02-02 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/reset.c | 68 --- include/linux/scmi_protocol.h | 11 - 2 files

[PATCH v6 20/37] firmware: arm_scmi: remove legacy scmi_clk_ops protocol interface

2021-02-02 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/clock.c | 67 --- include/linux/scmi_protocol.h | 15 --- 2 files

[PATCH v6 34/37] firmware: arm_scmi: cleanup events registration transient code

2021-02-02 Thread Cristian Marussi
Remove all the events registration code used to ease the transition to the new interface based on protocol handles.. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/base.c| 4 ++-- drivers/firmware/arm_scmi/notify.h | 6 +++--- drivers/firmware/arm_scmi/perf.c| 9

[PATCH v6 25/37] hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface

2021-02-02 Thread Cristian Marussi
Port driver to the new SCMI Sensor interface based on protocol handles and common devm_get_ops(). Cc: Guenter Roeck Cc: Jean Delvare Signed-off-by: Cristian Marussi --- v4 --> v5 - using renamed devm_get/put_protocol --- drivers/hwmon/scmi-hwmon.c | 24 +++- 1 file chan

[PATCH v6 07/37] firmware: arm_scmi: refactor events registration

2021-02-02 Thread Cristian Marussi
the legacy protocol init routines. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/base.c| 15 +++--- drivers/firmware/arm_scmi/common.h | 2 + drivers/firmware/arm_scmi/driver.c | 7 +++ drivers/firmware/arm_scmi/notify.c | 77 - drivers/firmware

[PATCH v6 19/37] clk: scmi: port driver to the new scmi_clk_proto_ops interface

2021-02-02 Thread Cristian Marussi
Port driver to the new SCMI Clock interface based on protocol handles and common devm_get_ops(). Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Cristian Marussi --- v4 --> v5 - using renamed devm_get/put_protocol --- drivers/clk/clk-scmi.c | 27 +-- 1 f

[PATCH v6 28/37] firmware: arm_scmi: port Voltage protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/voltage.c | 179 ++-- include/linux/scmi_protocol.h | 24 ++-- 2 files changed, 136 insertions(+), 67 deletions(-) diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c

[PATCH v6 22/37] reset: reset-scmi: port driver to the new scmi_reset_proto_ops interface

2021-02-02 Thread Cristian Marussi
Port driver to the new SCMI Reset interface based on protocol handles and common devm_get_ops(). Cc: Philipp Zabel Signed-off-by: Cristian Marussi --- v4 --> v5 - using renamed devm_get/put_protocol --- drivers/reset/reset-scmi.c | 33 - 1 file changed,

[PATCH v6 18/37] firmware: arm_scmi: port Clock protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
off-by: Cristian Marussi --- drivers/firmware/arm_scmi/clock.c | 182 -- include/linux/scmi_protocol.h | 20 +++- 2 files changed, 139 insertions(+), 63 deletions(-) diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c index e8c84c

[PATCH v6 16/37] firmware: arm_scmi: port GenPD driver to the new scmi_power_proto_ops interface

2021-02-02 Thread Cristian Marussi
Port driver to the new SCMI Power interface based on protocol handles and common devm_get_ops(). Signed-off-by: Cristian Marussi --- v4 --> v5 - using renamed devm_get/put_protocol --- drivers/firmware/arm_scmi/scmi_pm_domain.c | 26 +- 1 file changed, 16 insertions(+),

[PATCH v6 30/37] firmware: arm_scmi: remove legacy scmi_voltage_ops protocol interface

2021-02-02 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/voltage.c | 67 - include/linux/scmi_protocol.h | 16 --- 2

[PATCH v6 13/37] cpufreq: scmi: port driver to the new scmi_perf_proto_ops interface

2021-02-02 Thread Cristian Marussi
Port driver to the new SCMI Perf interface based on protocol handles and common devm_get_ops(). Cc: Rafael J. Wysocki Cc: Viresh Kumar Signed-off-by: Cristian Marussi --- v4 --> v5 - using renamed devm_get/put_protocol --- drivers/cpufreq/scmi-cpufreq.c |

[PATCH v6 09/37] firmware: arm_scmi: add new protocol handle core xfer ops

2021-02-02 Thread Cristian Marussi
protocol migration. In order to support such migration the above wrappers and some additional transient code is also introduced in this commit: it will be later removed as a whole once the full migration of protocols and SCMI drivers will have been completed. Signed-off-by: Cristian Marussi --- An

[PATCH v6 12/37] firmware: arm_scmi: port Perf protocol to new protocols interface

2021-02-02 Thread Cristian Marussi
off-by: Cristian Marussi --- drivers/firmware/arm_scmi/perf.c | 349 --- include/linux/scmi_protocol.h| 30 ++- 2 files changed, 258 insertions(+), 121 deletions(-) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index f27a0a

[PATCH v6 14/37] firmware: arm_scmi: remove legacy scmi_perf_ops protocol interface

2021-02-02 Thread Cristian Marussi
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/perf.c | 120 --- include/linux/scmi_protocol.h| 27 --- 2 files

[PATCH v6 11/37] firmware: arm_scmi: port Base protocol to new interface

2021-02-02 Thread Cristian Marussi
Port Base protocol to new protocol handles based interface. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/base.c | 117 +++-- drivers/firmware/arm_scmi/common.h | 3 +- drivers/firmware/arm_scmi/driver.c | 14 +++- 3 files changed, 71 insertions

[PATCH v6 08/37] firmware: arm_scmi: convert events registration to protocol handles

2021-02-02 Thread Cristian Marussi
to ease such transition. Signed-off-by: Cristian Marussi --- In particular void* argument typing will be reverted later on once all the protocols have been ported. --- drivers/firmware/arm_scmi/base.c| 4 ++-- drivers/firmware/arm_scmi/driver.c | 1 + drivers/firmware/arm_scmi/notify.c

[PATCH v6 10/37] firmware: arm_scmi: add helper to access revision area memory

2021-02-02 Thread Cristian Marussi
Add an helper to grab, from a protocol handle, the handle common memory area allocated to store SCMI version data which is exposed on sysfs. Such helper will be needed by SCMI Base protocol initialization once it will be moved to new protocol handles scheme. Signed-off-by: Cristian Marussi

[PATCH v6 05/37] firmware: arm_scmi: make notifications aware of protocols users

2021-02-02 Thread Cristian Marussi
Account for any active registered notifier against the proper related protocol; do not consider pending event handlers, only active handlers will concur to protocol usage accounting. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/notify.c | 51 ++ 1

  1   2   3   4   5   6   >