mbox series

[V5,0/2] qcom aoss qmp_get and debugfs support patches

Message ID 1628161974-7182-1-git-send-email-deesin@codeaurora.org
Headers show
Series qcom aoss qmp_get and debugfs support patches | expand

Message

Deepak Kumar Singh Aug. 5, 2021, 11:12 a.m. UTC
[Changes from V4]
Revert back to get_device/put_device based approach.
Remove refcount and orphan variables in qmp handle.
Use devres api for qmp handle allocation as removing refcount based approach

Deepak Kumar Singh (2):
  soc: qcom: aoss: Expose send for generic usecase
  soc: qcom: aoss: Add debugfs entry

 drivers/soc/qcom/qcom_aoss.c       | 86 +++++++++++++++++++++++++++++++++++++-
 include/linux/soc/qcom/qcom_aoss.h | 38 +++++++++++++++++
 2 files changed, 123 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/soc/qcom/qcom_aoss.h

Comments

Stephen Boyd Aug. 5, 2021, 6:28 p.m. UTC | #1
Quoting Deepak Kumar Singh (2021-08-05 04:12:54)
> It can be useful to control the different power states of various
> parts of hardware for device testing. Add a debugfs node for qmp so
> messages can be sent to aoss for debugging and testing purposes.

Is it ever useful after device testing? I'd prefer we not apply this
patch as it looks like testing code that won't ever be used after
developing this driver.
Deepak Kumar Singh Aug. 30, 2021, 11:46 a.m. UTC | #2
On 8/5/2021 11:58 PM, Stephen Boyd wrote:
> Quoting Deepak Kumar Singh (2021-08-05 04:12:54)

>> It can be useful to control the different power states of various

>> parts of hardware for device testing. Add a debugfs node for qmp so

>> messages can be sent to aoss for debugging and testing purposes.

> Is it ever useful after device testing? I'd prefer we not apply this

> patch as it looks like testing code that won't ever be used after

> developing this driver.


This is not only for testing. Some user space clients can also use this 
to send messages to aoss.

One such example is setting higher ddr frequency during boot and 
reducing it post boot from user space.
Stephen Boyd Aug. 30, 2021, 11:01 p.m. UTC | #3
Quoting Deepak Kumar Singh (2021-08-30 04:46:53)
>

> On 8/5/2021 11:58 PM, Stephen Boyd wrote:

> > Quoting Deepak Kumar Singh (2021-08-05 04:12:54)

> >> It can be useful to control the different power states of various

> >> parts of hardware for device testing. Add a debugfs node for qmp so

> >> messages can be sent to aoss for debugging and testing purposes.

> > Is it ever useful after device testing? I'd prefer we not apply this

> > patch as it looks like testing code that won't ever be used after

> > developing this driver.

>

> This is not only for testing. Some user space clients can also use this

> to send messages to aoss.

>

> One such example is setting higher ddr frequency during boot and

> reducing it post boot from user space.

>


The debugfs file system should not be used by userspace to do things
like that. It's a debugging file system, not a configuration file
system. If you want to expose userspace control for this it needs to be
done in a different way.