Re: [PATCH v6 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-05-01 Thread Lina Iyer
On Fri, Apr 27 2018 at 17:24 -0600, Doug Anderson wrote: Hi, On Fri, Apr 27, 2018 at 2:54 PM, Matthias Kaehlcke wrote: > Am I getting something wrong here? The for_each_set_bit() should increment the 'i' and we would attempt to compare the first address in the request with the next command

Re: [PATCH v6 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-05-01 Thread Lina Iyer
On Tue, May 01 2018 at 10:42 -0600, Doug Anderson wrote: Hi, On Tue, May 1, 2018 at 9:10 AM, Lina Iyer wrote: Yes, this is incorrect in its current form. This is what it should be - static int find_match(const struct tcs_group *tcs, const struct tcs_cmd *cmd, int len

[PATCH] drivers: thermal: Update license to SPDX format

2018-05-07 Thread Lina Iyer
Update licences format for core thermal files. Signed-off-by: Lina Iyer --- drivers/thermal/of-thermal.c | 19 +-- drivers/thermal/thermal_core.c| 5 + drivers/thermal/thermal_core.h| 17 + drivers/thermal/thermal_helpers.c | 5 + drivers

[PATCH] drivers: thermal: step_wise: add support for hysteresis

2018-05-07 Thread Lina Iyer
. Signed-off-by: Ram Chandrasekar Signed-off-by: Lina Iyer --- drivers/thermal/step_wise.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c index ee047ca43084..cf07e2269291 100644

[PATCH] drivers: thermal: do not clobber cooling dev state from userspace

2018-05-07 Thread Lina Iyer
the userspace request and aggregate the userspace request with the governors' recommendation. Signed-off-by: Lina Iyer --- drivers/thermal/thermal_core.c| 1 + drivers/thermal/thermal_helpers.c | 2 +- drivers/thermal/thermal_sysfs.c | 8 +++- include/linux/thermal.h | 1 + 4

Re: [PATCH v8 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-05-10 Thread Lina Iyer
On Wed, May 09 2018 at 11:49 -0600, Steven Rostedt wrote: On Wed, 9 May 2018 11:01:52 -0600 Lina Iyer wrote: Log sent RPMH requests and interrupt responses in FTRACE. Has this changed since the last time I reviewed it? If not, please add the: Reviewed-by: Steven Rostedt (VMware) to you

Re: [PATCH v8 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-05-10 Thread Lina Iyer
On Wed, May 09 2018 at 17:25 -0600, Matthias Kaehlcke wrote: Hi Lina, On Wed, May 09, 2018 at 11:01:54AM -0600, Lina Iyer wrote: Sleep and wake requests are sent when the application processor subsystem of the SoC is entering deep sleep states like in suspend. These requests help lower

Re: [PATCH v8 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-05-10 Thread Lina Iyer
On Wed, May 09 2018 at 16:03 -0600, Matthias Kaehlcke wrote: On Wed, May 09, 2018 at 11:01:58AM -0600, Lina Iyer wrote: Platform drivers need make a lot of resource state requests at the same time, say, at the start or end of an usecase. It can be quite inefficient to send each request

Re: [PATCH v8 0/2] drivers/qcom: add Command DB support

2018-05-10 Thread Lina Iyer
On Wed, May 09 2018 at 15:30 -0600, Doug Anderson wrote: Lina On Wed, May 9, 2018 at 9:42 AM, Lina Iyer wrote: Hi Andy, David, These patches have been reviewed by our peers and have recieved no further comments in the past few weeks. Would you consider merging this in your trees? When I

Re: [PATCH v7 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-05-11 Thread Lina Iyer
Hi Doug, On Thu, May 10 2018 at 16:37 -0600, Doug Anderson wrote: Hi, On Tue, May 8, 2018 at 9:05 AM, wrote: On 2018-05-03 14:26, Doug Anderson wrote: Hi Doug, Hi, On Wed, May 2, 2018 at 12:37 PM, Lina Iyer wrote: +static struct rpmh_ctrlr rpmh_rsc[RPMH_MAX_CTRLR]; +static

Re: [PATCH v6 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-05-02 Thread Lina Iyer
On Tue, May 01 2018 at 17:45 -0600, Doug Anderson wrote: Hi, On Thu, Apr 19, 2018 at 3:16 PM, Lina Iyer wrote: +TCS-OFFSET: 0xD00 + + apps_rsc: rsc@179e000 { This label is wrong in two ways: 1. I believe it's supposed to be the first reg listed, so 179c 2. There's only 3 0's

[PATCH v7 00/10] drivers/qcom: add RPMH communication support

2018-05-02 Thread Lina Iyer
consider reviewing this patchset. v1: https://www.spinics.net/lists/devicetree/msg210980.html v2: https://lkml.org/lkml/2018/2/15/852 v3: https://lkml.org/lkml/2018/3/2/801 v4: https://lkml.org/lkml/2018/3/9/979 v5: https://lkml.org/lkml/2018/4/5/480 v6: https://lkml.org/lkml/2018/4/19/914 Lina Iyer (10

[PATCH v7 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-05-02 Thread Lina Iyer
Log sent RPMH requests and interrupt responses in FTRACE. Cc: Steven Rostedt Signed-off-by: Lina Iyer --- Changes in v7: - varible name changes and white space Changes in v6: - struct tcs_response was removed. Fix in trace as well. Changes in v4: - fix compilation

[PATCH v7 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-05-02 Thread Lina Iyer
. rpmh_write_batch() is a blocking call that can be used to send multiple RPMH command sets. Each RPMH command set is set asynchronously and the API blocks until all the command sets are complete and receive their tx_done callbacks. Signed-off-by: Lina Iyer --- Changes in v7: - Check

[PATCH v7 10/10] drivers: qcom: rpmh-rsc: allow active requests from wake TCS

2018-05-02 Thread Lina Iyer
that the wake TCS is being repurposed to send active request, hence the sleep and wake TCSes be invalidated before the active request is sent. Signed-off-by: Lina Iyer Reviewed-by: Matthias Kaehlcke --- drivers/soc/qcom/rpmh-rsc.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion

[PATCH v7 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-05-02 Thread Lina Iyer
Add device binding documentation for Qualcomm Technology Inc's RPMH RSC driver. The driver is used for communicating resource state requests for shared resources. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer Reviewed-by: Rob Herring --- Changes in v7: - Fix example Changes

[PATCH v7 07/10] drivers: qcom: rpmh: cache sleep/wake state requests

2018-05-02 Thread Lina Iyer
activity and may be called from the system PM drivers when the system is entering suspend or deeper sleep modes during cpuidle. Also allow invalidating the cached requests, so they may be re-populated again. Signed-off-by: Lina Iyer Reviewed-by: Evan Green --- Changes in v6: - replace

[PATCH v7 08/10] drivers: qcom: rpmh: allow requests to be sent asynchronously

2018-05-02 Thread Lina Iyer
in the context of the controller's thread and frees the allocated memory. This API allows RPMH requests from atomic contexts as well. Signed-off-by: Lina Iyer --- Changes in v6: - replace rpmh_client with device * --- drivers/soc/qcom/rpmh.c | 52

[PATCH v7 06/10] drivers: qcom: rpmh-rsc: allow invalidation of sleep/wake TCS

2018-05-02 Thread Lina Iyer
Allow sleep and wake commands to be cleared from the respective TCSes, so that they can be re-populated. Signed-off-by: Lina Iyer --- Changes in v7: - Move bitmap_zero() outside the loop Changes in v6: - remove unnecessary locks around __tcs_invalidate - rename function

[PATCH v7 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-05-02 Thread Lina Iyer
be used to send active state requests. Signed-off-by: Lina Iyer --- Changes in v7: - Optimization and locking fixes Changes in v6: - replace rpmh_client with device - inline wait_for_tx_done() Changes in v4: - use const struct tcs_cmd in API - remove wait

[PATCH v7 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-05-02 Thread Lina Iyer
at the time of writing. The TCS are triggered by the firmware after the last of the CPUs has executed its WFI. Since these requests may come in different batches of requests, it is the job of this controller driver to find and arrange the requests into the available TCSes. Signed-off-by: Lina Iyer

[PATCH v7 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-05-02 Thread Lina Iyer
of requests. Active mode TCSes (AMC) are used to send requests immediately to the resource, while control TCS are used to provide specific information to the controller. Sleep and Wake TCS send sleep and wake requests, after and before the system halt respectively. Signed-off-by: Lina Iyer --- Changes

[PATCH RFC 0/4] drivers/thermal: support for multiple TZ for sensor

2018-05-08 Thread Lina Iyer
om any thermal zone of the sensor. - Patch #4 notifies the framework and the related thermal zones when the sensor is tripped Please consider reviewing these patches. We have seen benefits of this idea and is implemented and used in mobile products. Lina Iyer (4): drivers: of-thermal: abstract

[PATCH RFC 1/4] drivers: of-thermal: abstract sensor related information

2018-05-08 Thread Lina Iyer
-by: Ram Chandrasekar Signed-off-by: Lina Iyer --- drivers/thermal/of-thermal.c | 72 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index eea2fce82bf7..b402edd09ed1 100644 --- a/drivers

[PATCH RFC 4/4] drivers: of-thermal: notify framework when sensor is tripped

2018-05-08 Thread Lina Iyer
Notify all related thermal zones when the sensor reports a thermal trip. Signed-off-by: Lina Iyer --- drivers/thermal/of-thermal.c | 83 ++-- include/linux/thermal.h | 4 ++ 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/drivers/thermal

[PATCH RFC 3/4] drivers: of-thermal: aggregate sensor trips across thermal zones

2018-05-08 Thread Lina Iyer
Aggregate thermal trip based on the trip points of the thermal zones that use this sensor as the source. Signed-off-by: Lina Iyer --- drivers/thermal/of-thermal.c | 28 ++- drivers/thermal/thermal_helpers.c | 37 ++- include/linux/thermal.h

[PATCH RFC 2/4] drivers: of-thermal: allow multiple thermal zones for a sensor

2018-05-08 Thread Lina Iyer
To allow different mitigative actions based on a sensor temperature, it is desirable to have multiple thermal zones share the same source. The thermal zones could have different thresholds, mitigative actions and even different governors. Signed-off-by: Lina Iyer --- drivers/thermal

Re: [PATCH] drivers: thermal: step_wise: add support for hysteresis

2018-05-09 Thread Lina Iyer
Hi Daniel, On Tue, May 08 2018 at 20:04 -0600, Daniel Lezcano wrote: On Mon, May 07, 2018 at 11:54:08AM -0600, Lina Iyer wrote: From: Ram Chandrasekar From: Ram Chandrasekar Step wise governor increases the mitigation level when the temperature goes above a threshold and will decrease

Re: [PATCH v8 0/2] drivers/qcom: add Command DB support

2018-05-09 Thread Lina Iyer
Hi Andy, David, These patches have been reviewed by our peers and have recieved no further comments in the past few weeks. Would you consider merging this in your trees? Thanks, Lina On Tue, Apr 10 2018 at 11:57 -0600, Lina Iyer wrote: Changes since v7: - Add reviewed-by tags

[PATCH v8 10/10] drivers: qcom: rpmh-rsc: allow active requests from wake TCS

2018-05-09 Thread Lina Iyer
that the wake TCS is being repurposed to send active request, hence the sleep and wake TCSes be invalidated before the active request is sent. Signed-off-by: Lina Iyer Reviewed-by: Matthias Kaehlcke --- drivers/soc/qcom/rpmh-rsc.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion

[PATCH v8 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-05-09 Thread Lina Iyer
. rpmh_write_batch() is a blocking call that can be used to send multiple RPMH command sets. Each RPMH command set is set asynchronously and the API blocks until all the command sets are complete and receive their tx_done callbacks. Signed-off-by: Lina Iyer --- Changes in v7: - Check

[PATCH v8 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-05-09 Thread Lina Iyer
at the time of writing. The TCS are triggered by the firmware after the last of the CPUs has executed its WFI. Since these requests may come in different batches of requests, it is the job of this controller driver to find and arrange the requests into the available TCSes. Signed-off-by: Lina Iyer

[PATCH v8 07/10] drivers: qcom: rpmh: cache sleep/wake state requests

2018-05-09 Thread Lina Iyer
activity and may be called from the system PM drivers when the system is entering suspend or deeper sleep modes during cpuidle. Also allow invalidating the cached requests, so they may be re-populated again. Signed-off-by: Lina Iyer Reviewed-by: Evan Green Reviewed-by: Matthias Kaehlcke --- Changes

[PATCH v8 08/10] drivers: qcom: rpmh: allow requests to be sent asynchronously

2018-05-09 Thread Lina Iyer
in the context of the controller's thread and frees the allocated memory. This API allows RPMH requests from atomic contexts as well. Signed-off-by: Lina Iyer --- Changes in v6: - replace rpmh_client with device * --- drivers/soc/qcom/rpmh.c | 52

[PATCH v8 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-05-09 Thread Lina Iyer
Add device binding documentation for Qualcomm Technology Inc's RPMH RSC driver. The driver is used for communicating resource state requests for shared resources. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer Reviewed-by: Rob Herring --- Changes in v8: - Describe IRQ for all

[PATCH v8 06/10] drivers: qcom: rpmh-rsc: allow invalidation of sleep/wake TCS

2018-05-09 Thread Lina Iyer
Allow sleep and wake commands to be cleared from the respective TCSes, so that they can be re-populated. Signed-off-by: Lina Iyer --- Changes in v7: - Move bitmap_zero() outside the loop Changes in v6: - remove unnecessary locks around __tcs_invalidate - rename function

[PATCH v8 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-05-09 Thread Lina Iyer
be used to send active state requests. Signed-off-by: Lina Iyer --- Changes in v7: - Optimization and locking fixes Changes in v6: - replace rpmh_client with device - inline wait_for_tx_done() Changes in v4: - use const struct tcs_cmd in API - remove wait

[PATCH v8 00/10] drivers/qcom: add RPMH communication support

2018-05-09 Thread Lina Iyer
://lkml.org/lkml/2018/3/9/979 v5: https://lkml.org/lkml/2018/4/5/480 v6: https://lkml.org/lkml/2018/4/19/914 v7: https://lkml.org/lkml/2018/5/2/779 Lina Iyer (10): drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs drivers

[PATCH v8 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-05-09 Thread Lina Iyer
Log sent RPMH requests and interrupt responses in FTRACE. Cc: Steven Rostedt Signed-off-by: Lina Iyer --- Changes in v7: - varible name changes and white space Changes in v6: - struct tcs_response was removed. Fix in trace as well. Changes in v4: - fix compilation

[PATCH v8 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-05-09 Thread Lina Iyer
of requests. Active mode TCSes (AMC) are used to send requests immediately to the resource, while control TCS are used to provide specific information to the controller. Sleep and Wake TCS send sleep and wake requests, after and before the system halt respectively. Signed-off-by: Lina Iyer --- Changes

[PATCH v6 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-04-05 Thread Lina Iyer
From: Mahesh Sivasubramanian Command DB provides information on shared resources like clocks, regulators etc., probed at boot by the remote subsytem and made available in shared memory. Cc: devicet...@vger.kernel.org Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer --- Changes

[PATCH v6 0/2] drivers/qcom: add Command DB support

2018-04-05 Thread Lina Iyer
://patchwork.kernel.org/patch/10242935/ [v5]: https://lkml.org/lkml/2018/3/14/787 Lina Iyer (2): drivers: qcom: add command DB driver dt-bindings: introduce Command DB for QCOM SoCs .../bindings/reserved-memory/qcom,cmd-db.txt | 37 +++ drivers/of/platform.c

[PATCH v6 1/2] drivers: qcom: add command DB driver

2018-04-05 Thread Lina Iyer
to the SoC and the platform are made available in the shared memory. Drivers can query this information using predefined strings. Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer --- Changes in v6: - Remove indirection and use the actual command db memory in DT Changes in v5

[PATCH v5 00/10] drivers/qcom: add RPMH communication suppor

2018-04-05 Thread Lina Iyer
/2018/3/2/801 v4: https://lkml.org/lkml/2018/3/9/979 Lina Iyer (10): drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE drivers: qcom: rpmh: add RPMH helper functions

[PATCH v5 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-04-05 Thread Lina Iyer
. rpmh_write_batch() is a blocking call that can be used to send multiple RPMH command sets. Each RPMH command set is set asynchronously and the API blocks until all the command sets are complete and receive their tx_done callbacks. Signed-off-by: Lina Iyer Reviewed-by: Evan Green --- Changes

[PATCH v5 06/10] drivers: qcom: rpmh-rsc: allow invalidation of sleep/wake TCS

2018-04-05 Thread Lina Iyer
Allow sleep and wake commands to be cleared from the respective TCSes, so that they can be re-populated. Signed-off-by: Lina Iyer --- Changes in v4: - refactored the rphm_rsc_invalidate() --- drivers/soc/qcom/rpmh-internal.h | 1 + drivers/soc/qcom/rpmh-rsc.c | 48

[PATCH v5 07/10] drivers: qcom: rpmh: cache sleep/wake state requests

2018-04-05 Thread Lina Iyer
PM activity and may be called from the system PM drivers when the system is entering suspend or deeper sleep modes during cpuidle. Also allow invalidating the cached requests, so they may be re-populated again. Signed-off-by: Lina Iyer Reviewed-by: Evan Green --- Changes in v4: - remove

[PATCH v5 10/10] drivers: qcom: rpmh-rsc: allow active requests from wake TCS

2018-04-05 Thread Lina Iyer
that the wake TCS is being repurposed to send active request, hence the sleep and wake TCSes be invalidated before the active request is sent. Signed-off-by: Lina Iyer --- drivers/soc/qcom/rpmh-rsc.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom

[PATCH v5 08/10] drivers: qcom: rpmh: allow requests to be sent asynchronously

2018-04-05 Thread Lina Iyer
in the context of the controller's thread and frees the allocated memory. This API allows RPMH requests from atomic contexts as well. Signed-off-by: Lina Iyer --- drivers/soc/qcom/rpmh.c | 53 + include/soc/qcom/rpmh.h | 8 2 files changed

[PATCH v5 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-04-05 Thread Lina Iyer
of requests. Control TCS are used to provide specific information to the controller. Signed-off-by: Lina Iyer --- Changes in v4: - lots of variable name changes as suggested by Stephen B - use of const for data pointers - fix comments and other code syntax - use

[PATCH v5 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-04-05 Thread Lina Iyer
at the time of writing. The TCS are triggered by the firmware after the last of the CPUs has executed its WFI. Since these requests may come in different batches of requests, it is the job of this controller driver to find and arrange the requests into the available TCSes. Signed-off-by: Lina Iyer

[PATCH v5 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-04-05 Thread Lina Iyer
Log sent RPMH requests and interrupt responses in FTRACE. Cc: Steven Rostedt Signed-off-by: Lina Iyer Reviewed-by: Steven Rostedt (VMware) --- Changes in v4: - fix compilation issues, use __assign_str - use %#x instead of 0x%08x Changes in v3: - Use __string() instead

[PATCH v5 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-04-05 Thread Lina Iyer
be used to send active state requests. Signed-off-by: Lina Iyer --- Changes in v4: - use const struct tcs_cmd in API - remove wait count from this patch - changed -EFAULT to -EINVAL --- drivers/soc/qcom/Makefile| 4 +- drivers/soc/qcom/rpmh-internal.h | 2

[PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-05 Thread Lina Iyer
Add device binding documentation for Qualcomm Technology Inc's RPMH RSC driver. The driver is used for communicating resource state requests for shared resources. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer Reviewed-by: Rob Herring --- Changes in v3: - Move to soc/qcom

Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-11 Thread Lina Iyer
On Wed, Apr 11 2018 at 09:29 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-09 09:08:00) On Fri, Apr 06 2018 at 19:14 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2018-04-05 09:18:26) >> diff --git a/Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt b/Documentation/d

Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-11 Thread Lina Iyer
On Tue, Apr 10 2018 at 13:36 -0600, Bjorn Andersson wrote: On Mon 09 Apr 09:08 PDT 2018, Lina Iyer wrote: On Fri, Apr 06 2018 at 19:14 -0600, Stephen Boyd wrote: > Quoting Lina Iyer (2018-04-05 09:18:26) > > diff --git a/Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt b/Docu

Re: [PATCH v5 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-04-13 Thread Lina Iyer
On Tue, Apr 10 2018 at 22:39 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-05 09:18:25) Add controller driver for QCOM SoCs that have hardware based shared resource management. The hardware IP known as RSC (Resource State Coordinator) houses multiple Direct Resource Voter (DRV

Re: [PATCH v5 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-04-13 Thread Lina Iyer
On Tue, Apr 10 2018 at 17:40 -0600, Bjorn Andersson wrote: On Thu 05 Apr 09:18 PDT 2018, Lina Iyer wrote: [..] diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h [..] +/** + * struct tcs_response: Response object for a request + * + * @drv: the controller

[PATCH v6 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-04-19 Thread Lina Iyer
of requests. Active mode TCSes (AMC) are used to send requests immediately to the resource, while control TCS are used to provide specific information to the controller. Sleep and Wake TCS send sleep and wake requests, after and before the system halt respectively. Signed-off-by: Lina Iyer --- Changes

[PATCH v6 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-04-19 Thread Lina Iyer
Log sent RPMH requests and interrupt responses in FTRACE. Cc: Steven Rostedt Signed-off-by: Lina Iyer --- Changes in v6: - struct tcs_response was removed. Fix in trace as well. Changes in v4: - fix compilation issues, use __assign_str - use %#x instead of 0x%08x

[PATCH v6 06/10] drivers: qcom: rpmh-rsc: allow invalidation of sleep/wake TCS

2018-04-19 Thread Lina Iyer
Allow sleep and wake commands to be cleared from the respective TCSes, so that they can be re-populated. Signed-off-by: Lina Iyer --- Changes in v6: - remove unnecessary locks around __tcs_invalidate - rename function to tcs_invaldiate Changes in v4: - refactored

[PATCH v6 00/10] drivers/qcom: add RPMH communication support

2018-04-19 Thread Lina Iyer
/2018/4/5/480 Lina Iyer (10): drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE drivers: qcom: rpmh: add RPMH helper functions drivers: qcom: rpmh-rsc: write sleep/wake

[PATCH v6 10/10] drivers: qcom: rpmh-rsc: allow active requests from wake TCS

2018-04-19 Thread Lina Iyer
that the wake TCS is being repurposed to send active request, hence the sleep and wake TCSes be invalidated before the active request is sent. Signed-off-by: Lina Iyer --- drivers/soc/qcom/rpmh-rsc.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom

[PATCH v6 08/10] drivers: qcom: rpmh: allow requests to be sent asynchronously

2018-04-19 Thread Lina Iyer
in the context of the controller's thread and frees the allocated memory. This API allows RPMH requests from atomic contexts as well. Signed-off-by: Lina Iyer --- Changes in v6: - replace rpmh_client with device * --- drivers/soc/qcom/rpmh.c | 52

[PATCH v6 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-04-19 Thread Lina Iyer
. rpmh_write_batch() is a blocking call that can be used to send multiple RPMH command sets. Each RPMH command set is set asynchronously and the API blocks until all the command sets are complete and receive their tx_done callbacks. Signed-off-by: Lina Iyer --- Changes in v6: - replace

[PATCH v6 07/10] drivers: qcom: rpmh: cache sleep/wake state requests

2018-04-19 Thread Lina Iyer
activity and may be called from the system PM drivers when the system is entering suspend or deeper sleep modes during cpuidle. Also allow invalidating the cached requests, so they may be re-populated again. Signed-off-by: Lina Iyer Reviewed-by: Evan Green --- Changes in v6: - replace

[PATCH v6 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-04-19 Thread Lina Iyer
be used to send active state requests. Signed-off-by: Lina Iyer --- Changes in v6: - replace rpmh_client with device - inline wait_for_tx_done() Changes in v4: - use const struct tcs_cmd in API - remove wait count from this patch - changed -EFAULT to -EINVAL

[PATCH v6 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-04-19 Thread Lina Iyer
at the time of writing. The TCS are triggered by the firmware after the last of the CPUs has executed its WFI. Since these requests may come in different batches of requests, it is the job of this controller driver to find and arrange the requests into the available TCSes. Signed-off-by: Lina Iyer

[PATCH v6 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-19 Thread Lina Iyer
Add device binding documentation for Qualcomm Technology Inc's RPMH RSC driver. The driver is used for communicating resource state requests for shared resources. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer Reviewed-by: Rob Herring --- Changes in v6: - Address comments from

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-04-20 Thread Lina Iyer
On Fri, Apr 20 2018 at 13:07 -0600, David Collins wrote: On 04/18/2018 10:55 PM, Stephen Boyd wrote: Quoting David Collins (2018-03-22 18:30:06) On 03/21/2018 12:07 PM, Stephen Boyd wrote: Quoting David Collins (2018-03-16 18:09:10) diff --git a/drivers/regulator/Kconfig

Re: [PATCH v5 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-04-09 Thread Lina Iyer
On Fri, Apr 06 2018 at 19:21 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-05 09:18:28) diff --git a/include/soc/qcom/rpmh.h b/include/soc/qcom/rpmh.h new file mode 100644 index ..95334d4c1ede --- /dev/null +++ b/include/soc/qcom/rpmh.h @@ -0,0 +1,34 @@ +/* SPDX-License

Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-09 Thread Lina Iyer
On Fri, Apr 06 2018 at 19:14 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-05 09:18:26) diff --git a/Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt b/Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt new file mode 100644 index ..dcf71a5b302f --- /dev/null

Re: [PATCH v7 [RESEND] 1/2] drivers: qcom: add command DB driver

2018-04-10 Thread Lina Iyer
On Fri, Apr 06 2018 at 17:23 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-06 08:13:55) From: Mahesh Sivasubramanian Command DB is a simple database in the shared memory of QCOM SoCs, that provides information regarding shared resources. Some shared resources in the SoC have

[PATCH v8 1/2] drivers: qcom: add command DB driver

2018-04-10 Thread Lina Iyer
to the SoC and the platform are made available in the shared memory. Drivers can query this information using predefined strings. Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd --- Changes in v6: - Remove indirection and use

[PATCH v8 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-04-10 Thread Lina Iyer
From: Mahesh Sivasubramanian Command DB provides information on shared resources like clocks, regulators etc., probed at boot by the remote subsytem and made available in shared memory. Cc: devicet...@vger.kernel.org Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Reviewed

[PATCH v8 0/2] drivers/qcom: add Command DB support

2018-04-10 Thread Lina Iyer
/2018/4/6/756 Lina Iyer (2): drivers: qcom: add command DB driver dt-bindings: introduce Command DB for QCOM SoCs .../bindings/reserved-memory/qcom,cmd-db.txt | 37 +++ drivers/of/platform.c | 1 + drivers/soc/qcom/Kconfig | 9

Re: [PATCH v5 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

2018-04-11 Thread Lina Iyer
On Tue, Apr 10 2018 at 18:31 -0600, Bjorn Andersson wrote: On Thu 05 Apr 09:18 PDT 2018, Lina Iyer wrote: diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h [..] @@ -439,6 +445,107 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg

Re: [PATCH v5 04/10] drivers: qcom: rpmh: add RPMH helper functions

2018-04-11 Thread Lina Iyer
On Tue, Apr 10 2018 at 20:23 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-09 08:36:31) On Fri, Apr 06 2018 at 19:21 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2018-04-05 09:18:28) >> diff --git a/include/soc/qcom/rpmh.h b/include/soc/qcom/rpmh.h >> new file mode

Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-16 Thread Lina Iyer
On Fri, Apr 13 2018 at 16:40 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-11 14:24:31) On Wed, Apr 11 2018 at 09:29 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2018-04-09 09:08:00) >> On Fri, Apr 06 2018 at 19:14 -0600, Stephen Boyd wrote: >> >Quoting Lina Iyer (2

Re: [PATCH v7 01/26] PM / Domains: Don't treat zero found compatible idle states as an error

2018-04-16 Thread Lina Iyer
states have been found/allocated. This enables the caller of of_genpd_parse_idle_states() to easier act on the returned error code. Cc: Lina Iyer Signed-off-by: Ulf Hansson Reviewed-by: Lina Iyer --- drivers/base/power/domain.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions

Re: [PATCH v7 02/26] PM / Domains: Deal with multiple states but no governor in genpd

2018-04-16 Thread Lina Iyer
ies the constraints. Therefore, let's print a warning to inform the user about such bogus configuration and avoid to bail out, by instead picking the shallowest state before genpd invokes the ->power_off() callback. Cc: Lina Iyer Signed-off-by: Ulf Hansson Reviewed-by: Lina Iyer --- drivers/base

Re: [PATCH v5 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-04-16 Thread Lina Iyer
On Fri, Apr 13 2018 at 11:43 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-13 08:37:25) On Tue, Apr 10 2018 at 22:39 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2018-04-05 09:18:25) >> >> + */ >> +static irqreturn_t tcs_irq_handler(int irq, void *p) >> +

Re: [PATCH] soc: qcom: cmd-db: Make endian-agnostic

2018-04-17 Thread Lina Iyer
we already pad out the string 'id' field to exactly 8 bytes with the strncpy() onto the stack. Cc: Mahesh Sivasubramanian Cc: Lina Iyer Cc: Bjorn Andersson Cc: Evan Green Signed-off-by: Stephen Boyd --- Changes from inline patch: * Fixed magic * Made function for memcmp() * drivers/soc/qcom

Re: [PATCH] soc: qcom: cmd-db: Make endian-agnostic

2018-04-17 Thread Lina Iyer
On Tue, Apr 17 2018 at 11:22 -0600, Lina Iyer wrote: On Thu, Apr 12 2018 at 16:41 -0600, Stephen Boyd wrote: This driver deals with memory that is stored in little-endian format. Update the structures with the proper little-endian types and then do the proper conversions when reading the fields

Re: [PATCH v3] soc: qcom: cmd-db: Make endian-agnostic

2018-04-23 Thread Lina Iyer
we already pad out the string 'id' field to exactly 8 bytes with the strncpy() onto the stack. Cc: Mahesh Sivasubramanian Cc: Lina Iyer Cc: Bjorn Andersson Cc: Evan Green Signed-off-by: Stephen Boyd --- Tested-by: Lina Iyer Changes from v2: * Fixed rsc_offset conversion to use

[PATCH v7 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-04-06 Thread Lina Iyer
From: Mahesh Sivasubramanian Command DB provides information on shared resources like clocks, regulators etc., probed at boot by the remote subsytem and made available in shared memory. Cc: devicet...@vger.kernel.org Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Reviewed

[PATCH v7 0/2] drivers/qcom: add Command DB support

2018-04-06 Thread Lina Iyer
://lkml.org/lkml/2018/2/8/588 [v3]: https://lkml.org/lkml/2018/2/16/842 [v4]: https://patchwork.kernel.org/patch/10242935/ [v5]: https://lkml.org/lkml/2018/3/14/787 [v6]: https://lkml.org/lkml/2018/4/5/451 Lina Iyer (2): drivers: qcom: add command DB driver dt-bindings: introduce Command DB for QCOM

[PATCH v7 1/2] drivers: qcom: add command DB driver

2018-04-06 Thread Lina Iyer
to the SoC and the platform are made available in the shared memory. Drivers can query this information using predefined strings. Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Reviewed-by: Bjorn Andersson --- Changes in v6: - Remove indirection and use the actual command db

[PATCH v7 [RESEND] 0/2] drivers/qcom: add Command DB support

2018-04-06 Thread Lina Iyer
://www.spinics.net/lists/linux-arm-msm/msg32462.html [v2]: https://lkml.org/lkml/2018/2/8/588 [v3]: https://lkml.org/lkml/2018/2/16/842 [v4]: https://patchwork.kernel.org/patch/10242935/ [v5]: https://lkml.org/lkml/2018/3/14/787 [v6]: https://lkml.org/lkml/2018/4/5/451 Lina Iyer (2): drivers: qcom: add

[PATCH v7 [RESEND] 1/2] drivers: qcom: add command DB driver

2018-04-06 Thread Lina Iyer
to the SoC and the platform are made available in the shared memory. Drivers can query this information using predefined strings. Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Reviewed-by: Bjorn Andersson --- Changes in v6: - Remove indirection and use the actual command db

[PATCH v7 [RESEND] 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-04-06 Thread Lina Iyer
From: Mahesh Sivasubramanian Command DB provides information on shared resources like clocks, regulators etc., probed at boot by the remote subsytem and made available in shared memory. Cc: devicet...@vger.kernel.org Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Reviewed

Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs

2018-04-18 Thread Lina Iyer
On Mon, Apr 16 2018 at 00:01 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-16 09:08:18) On Fri, Apr 13 2018 at 16:40 -0600, Stephen Boyd wrote: >Well it seems like an RSC contains many DRVs and those DRVs contain many >TCSes. This is what I get after talking with Bjorn

Re: [PATCH v5 07/10] drivers: qcom: rpmh: cache sleep/wake state requests

2018-04-19 Thread Lina Iyer
On Wed, Apr 18 2018 at 00:12 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2018-04-05 09:18:31) Active state requests are sent immediately to the mailbox controller, Drive by note, mailbox went away from this code so grep 'mailbox' or 'mbox' on these patches should come up with zero hits

Re: [PATCH v4 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-03-06 Thread Lina Iyer
On Mon, Mar 05 2018 at 16:15 -0700, Bjorn Andersson wrote: On Mon 26 Feb 09:58 PST 2018, Lina Iyer wrote: From: Mahesh Sivasubramanian Command DB provides information on shared resources like clocks, regulators etc., probed at boot by the remote subsytem and made available in shared memory

Re: [PATCH v4 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-03-06 Thread Lina Iyer
On Mon, Mar 05 2018 at 17:21 -0700, Stephen Boyd wrote: Quoting Lina Iyer (2018-02-26 09:58:02) diff --git a/Documentation/devicetree/bindings/arm/msm/cmd-db.txt b/Documentation/devicetree/bindings/arm/msm/cmd-db.txt new file mode 100644 index ..5737ed2ac6e8 --- /dev/null +++ b

Re: [PATCH v4 1/2] drivers: qcom: add command DB driver

2018-03-06 Thread Lina Iyer
On Mon, Mar 05 2018 at 11:42 -0700, Stephen Boyd wrote: Quoting Lina Iyer (2018-02-26 09:58:01) diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c new file mode 100644 index ..0792a2a98fc9 --- /dev/null +++ b/drivers/soc/qcom/cmd-db.c @@ -0,0 +1,319 @@ +/* SPDX

Re: [PATCH v4 1/2] drivers: qcom: add command DB driver

2018-03-06 Thread Lina Iyer
On Tue, Mar 06 2018 at 09:21 -0700, Lina Iyer wrote: On Mon, Mar 05 2018 at 11:42 -0700, Stephen Boyd wrote: Quoting Lina Iyer (2018-02-26 09:58:01) +size_t cmd_db_read_aux_data_len(const char *id) +{ + int ret; + struct entry_header ent; + struct rsc_hdr rsc_hdr

Re: [PATCH v3 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-03-06 Thread Lina Iyer
On Tue, Mar 06 2018 at 14:47 -0700, Steven Rostedt wrote: On Tue, 6 Mar 2018 13:38:06 +0800 kbuild test robot wrote: >> drivers/soc/qcom/./trace-rpmh.h:29:3: error: implicit declaration of function '__assign_string'; did you mean '__assign_str'? [-Werror=implicit-function-declaration]

Re: [PATCH v3 03/10] drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE

2018-03-06 Thread Lina Iyer
On Tue, Mar 06 2018 at 14:56 -0700, Lina Iyer wrote: On Tue, Mar 06 2018 at 14:47 -0700, Steven Rostedt wrote: On Tue, 6 Mar 2018 13:38:06 +0800 kbuild test robot wrote: drivers/soc/qcom/./trace-rpmh.h:29:3: error: implicit declaration of function '__assign_string'; did you mean

Re: [PATCH v3 07/10] drivers: qcom: rpmh: cache sleep/wake state requests

2018-03-06 Thread Lina Iyer
On Mon, Mar 05 2018 at 13:45 -0700, Evan Green wrote: Hi Lina, On Fri, Mar 2, 2018 at 8:43 AM, Lina Iyer wrote: Active state requests are sent immediately to the mailbox controller, while sleep and wake state requests are cached in this driver to avoid taxing the mailbox controller repeatedly

<    1   2   3   4   5   6   7   8   9   10   >