Re: [PATCH RESEND v2] interconnect: drop unused icc_get() interface

From: Mike Tipton
Date: Tue Jun 20 2023 - 17:57:53 EST


On 5/23/2023 2:52 AM, Johan Hovold wrote:
The icc_get() interface can be used to lookup an interconnect path based
on global node ids. There has never been any users of this interface and
all lookups are currently done from the devicetree.

Remove the unused icc_get() interface.

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---

Hi Georgi,

I just noticed that this patch never made it into 6.4 along with the
rest of the series:

https://lore.kernel.org/lkml/20230306075651.2449-23-johan+linaro@xxxxxxxxxx/

This interface is still unused in mainline and should be removed so
resending the patch again.

Johan


drivers/interconnect/core.c | 52 ++----------------------------------
include/linux/interconnect.h | 8 ------
2 files changed, 2 insertions(+), 58 deletions(-)


We have downstream debug/test modules that removing icc_get() will break. I'd like to get equivalent debug support in mainline, but until then I'd prefer we not remove this.

Our debug module adds debugfs files for requesting a path and voting BW to it. The path is defined by supplying the raw src_id / dst_id and calling icc_get() for them. This allows us to issue any request to any path from debugfs without needing to recompile or reflash devicetree. We use this extensively.

That said, I don't like the current implementation of icc_get(). It should take strings for src/dst rather than integer IDs. This would be similar to other interfaces like clk_get() and regulator_get(). And would allow users to specify their path in debugfs using logical names rather than raw integers.

I suspect having a mainline approach for voting paths from debugfs would be useful to others as well. There are similar debugfs control mechanisms in other frameworks already, e.g. clock.

Instead of removing icc_get() immediately, can we wait for a future patch series that adds debugfs as a consumer?