Re: scmi sensor

Sudeep Holla
2019-10-14T17:09:05Z

On Mon, Oct 14, 2019 at 06:26:57AM +0000, Sujeet Kumar Baranwal wrote:
> Hi Sudeep,
>
> In order to use scmi sensor TRIP_POINT_NOTIFY part, the protocol only
> specifies trip points to be configured, and it doesn't have any handler
> associated that shall be invoked upon those points being violated on agent.
> After registering the trip points for a sensor, how does the linux scmi
> sensor driver ever comes to know any violations reported by SCP?!

The notification part is not yet implemented. It's yet another work
in progress feature.

>
> In the scmi_rx_callback() in ISR context, I only see complete(xfer->done)
> which would only let a blocked thread know it could proceed but that means
> some application needs to be initiated and permanently stalled, listening
> to this event?
>

Yes we need to set up Rx channel, buffers and then handle the event.
Rx channel support was added in v5.4, I have posted patch for setting up
buffers[1] but didn't merge without the user. I am still debating on how
to add notification APIs from SCMI for it's users.

> My requirement is that some how I register a call back in linux's scmi senor
> protocol that would be called when trip values are violated and it shall be
> initiated by platform to the agent. It doesn't appear to be a possibility
> looking at the current implementation and msg ids of scmi sensor protocol.
> Am I missing something?
>

As I mentioned earlier all these are WIP. Without platform to test, I am
not actively developing these. I can share patches when it's in good shape.

--
Regards,
Sudeep

[1] https://lore.kernel.org/lkml/20190708154730.16643-6-sudeep.holla@arm.com/

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org