Re: [PATCH v2] genirq: Machine-parsable version of /proc/interrupts
From: Randy Dunlap
Date: Thu Sep 08 2016 - 13:57:28 EST
On 09/08/16 10:34, Craig Gallek wrote:
> From: Craig Gallek <kraig@xxxxxxxxxx>
>
> Add struct kobject to struct irq_desc to allow for easy export
> to sysfs. This allows for much simpler userspace-parsing of
> the information contained in struct irq_desc.
Please give example(s) of the sysfs (output) format.
Also add the interface info to Documentation/ABI/.
> +static void irq_sysfs_add(int irq, struct irq_desc *desc)
> +{
> + if (irq_kobj_base) {
> + if (kobject_add(&desc->kobj, irq_kobj_base, "%d", irq))
> + pr_warn("Fail to add kobject for irq %d\n", irq);
Failed
> + }
> +}
Thanks.
--
~Randy