[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1305151148470.1388@ionos>
Date: Wed, 15 May 2013 11:50:14 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Stephen Boyd <sboyd@...eaurora.org>
cc: LKML <linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
Ingo Molnar <mingo@...e.hu>,
Magnus Damm <magnus.damm@...il.com>
Subject: Re: [patch 13/15] clockevents: Provide sysfs interface
On Fri, 26 Apr 2013, Stephen Boyd wrote:
> On 04/25, Thomas Gleixner wrote:
> > Provide a simple sysfs interface for the clockevent devices. Show the
> > current active clockevent device.
> >
>
> Neat. Does this do anything about clockevents that aren't in use
> for the tick devices or broadcast device?
No, but that would be simple to add.
> > +static int tick_broadcast_init_sysfs(void)
>
> __init?
Yes
> > +{
> > + int err = device_register(&tick_bc_dev);
> > +
> > + if (!err)
> > + err = device_create_file(&tick_bc_dev, &dev_attr_current_device);
> > + return err;
> > +}
> > +#else
> > +static struct tick_device *tick_get_tick_dev(struct device *dev)
> > +{
> > + return &per_cpu(tick_cpu_device, dev->id);
> > +}
> > +static inline int tick_broadcast_init_sysfs(void) { return 0; }
> > #endif
> > +
> > +int __init tick_init_sysfs(void)
>
> static?
Yes
> > +{
> > + int cpu;
> > +
> > + for_each_possible_cpu(cpu) {
> > + struct device *dev = &per_cpu(tick_percpu_dev, cpu);
> > + int err;
> > +
> > + dev->id = cpu;
> > + dev->bus = &clockevents_subsys;
> > + err = device_register(dev);
> > + if (!err)
> > + err = device_create_file(dev, &dev_attr_current_device);
> > + if (err)
> > + return err;
> > + }
> > + return tick_broadcast_init_sysfs();
> > +}
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> hosted by The Linux Foundation
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists