linux/arch/powerpc/perf
Lukas Wunner 3cc50d07be driver core: Add device_show_string() helper for sysfs attributes
For drivers wishing to expose an unsigned long, int or bool at a static
memory location in sysfs, the driver core provides ready-made helpers
such as device_show_ulong() to be used as ->show() callback.

Some drivers need to expose a string and so far they all provide their
own ->show() implementation.  arch/powerpc/perf/hv-24x7.c went so far
as to create a device_show_string() helper but kept it private.

Make it public for reuse by other drivers.  The pattern seems to be
sufficiently frequent to merit a public helper.

Add a DEVICE_STRING_ATTR_RO() macro in line with the existing
DEVICE_ULONG_ATTR() and similar macros to ease declaration of string
attributes.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/2e3eaaf2600bb55c0415c23ba301e809403a7aa2.1713608122.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 17:37:03 +02:00
..
req-gen
8xx-pmu.c
bhrb.S
callchain.c
callchain.h
callchain_32.c
callchain_64.c
core-book3s.c powerpc: Use user_mode() macro when possible 2024-02-22 21:55:33 +11:00
core-fsl-emb.c powerpc/perf: Convert fsl_emb notifier to state machine callbacks 2023-08-18 23:30:53 +10:00
e500-pmu.c
e6500-pmu.c
generic-compat-pmu.c
hv-24x7-catalog.h
hv-24x7-domains.h
hv-24x7.c driver core: Add device_show_string() helper for sysfs attributes 2024-05-04 17:37:03 +02:00
hv-24x7.h
hv-common.c
hv-common.h
hv-gpci-requests.h
hv-gpci.c powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks 2024-03-03 23:05:21 +11:00
hv-gpci.h
imc-pmu.c powerpc/imc-pmu: Add a null pointer check in update_events_in_group() 2023-12-13 22:19:43 +11:00
internal.h powerpc/perf: Power11 Performance Monitoring support 2024-02-21 23:11:00 +11:00
isa207-common.c
isa207-common.h
Makefile
mpc7450-pmu.c
perf_regs.c
power5+-pmu.c
power5-pmu.c
power6-pmu.c powerpc/perf: Optimize find_alternatives_list() using binary search 2023-10-19 23:18:59 +11:00
power7-events-list.h
power7-pmu.c
power8-events-list.h
power8-pmu.c
power9-events-list.h
power9-pmu.c
power10-events-list.h
power10-pmu.c powerpc/perf: Power11 Performance Monitoring support 2024-02-21 23:11:00 +11:00
ppc970-pmu.c