linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: ALSA <alsa-devel@alsa-project.org>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Sudheer Papothi <spapothi@codeaurora.org>,
	Takashi <tiwai@suse.de>,
	plai@codeaurora.org, LKML <linux-kernel@vger.kernel.org>,
	Pierre <pierre-louis.bossart@linux.intel.com>,
	patches.audio@intel.com, Mark <broonie@kernel.org>,
	srinivas.kandagatla@linaro.org,
	Sagar Dharia <sdharia@codeaurora.org>,
	alan@linux.intel.com
Subject: Re: [alsa-devel] [PATCH v5 10/15] soundwire: Add sysfs for SoundWire DisCo properties
Date: Fri, 22 Dec 2017 17:13:44 +0530	[thread overview]
Message-ID: <20171222114344.GS18649@localhost> (raw)
In-Reply-To: <20171222083344.GA11307@kroah.com>

On Fri, Dec 22, 2017 at 09:33:44AM +0100, Greg Kroah-Hartman wrote:
> On Fri, Dec 22, 2017 at 01:56:56PM +0530, Vinod Koul wrote:

> > Hey Greg,
> > 
> > So I have spent couple of days on this but don't have a solution.
> > 
> > I can create a subdirectory using dynamic attribute group by giving it a
> > name. Works as advertised:). But I am unable to create subdirectory under
> > newly created subdir. The properties defined by MIPI follow a certain
> > hierarchy so we need subdirectories to represent that.
> 
> Yes, you can't create directories 2 levels deep, sorry, didn't realize
> you wanted to do that.
> 
> > Second issue am facing with these is getting the sdw_bus context. I tried
> > adding it but nothing looks elegant. I tried making sdw_attributes on top of
> > struct attribute and pass around the bus but doesn't seem to work for me.
> > 
> > On the contrary, the current design of creating kobjects looked more
> > cleaner. It has been used in bunch of other places, I double checked ref
> > counting and cleanup looks okay to me. Btw I tested with libudev as well,
> > its works well as we do send the event using kobject_uevent().
> 
> Where has it been used in other parts of the kernel like this?  Time to
> go yell at people :)
> 
> And the issue isn't that you will not catch the uevent, but that this is
> an attribute of the "parent" device, which is now not a device, but a
> "raw" kobject on no bus at all.
> 
> So, just create these as real struct devices, with a different "type"
> and have them all live on the bus properly.  Look at how the greybus
> code does it as one example (USB is another one, but it's much more
> complex.)

Thanks for the quick reply.

Are you sure greybus is a right example?

Looking at audio_manager.c we seem to create kset thus kobject without a
device. It lives off global sysfs!

Probing further I think you wanted to point me to gb_interface_create()
which I think would be similar to sdw_add_bus_master(). So we should
create a device without a driver for this and make kobjects live off it.

So IIUC it is okay to create kbojects but make sure we they live with a
'device' right?

Thanks
-- 
~Vinod

  reply	other threads:[~2017-12-22 11:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 15:46 [PATCH v5 00/15] soundwire: Add a new SoundWire subsystem Vinod Koul
2017-12-06 15:46 ` [PATCH v5 01/15] Documentation: Add SoundWire summary Vinod Koul
2017-12-06 15:46 ` [PATCH v5 02/15] soundwire: Add SoundWire bus type Vinod Koul
2017-12-13  9:16   ` Greg Kroah-Hartman
2017-12-06 15:46 ` [PATCH v5 03/15] soundwire: Add Master registration Vinod Koul
2017-12-11 16:02   ` Takashi Iwai
2017-12-11 16:44     ` [alsa-devel] " Vinod Koul
2017-12-13  9:16   ` Greg Kroah-Hartman
2017-12-06 15:47 ` [PATCH v5 04/15] soundwire: Add MIPI DisCo property helpers Vinod Koul
2017-12-11 16:10   ` Takashi Iwai
2017-12-11 17:00     ` Vinod Koul
2017-12-11 17:06       ` Takashi Iwai
2017-12-11 17:18         ` Vinod Koul
2017-12-06 15:47 ` [PATCH v5 05/15] soundwire: Add SoundWire MIPI defined registers Vinod Koul
2017-12-06 15:47 ` [PATCH v5 06/15] soundwire: Add IO transfer Vinod Koul
2017-12-06 15:47 ` [PATCH v5 07/15] regmap: Add SoundWire bus support Vinod Koul
2017-12-06 15:47 ` [PATCH v5 08/15] soundwire: Add Slave status handling helpers Vinod Koul
2017-12-06 15:47 ` [PATCH v5 09/15] soundwire: Add slave status handling Vinod Koul
2017-12-06 15:47 ` [PATCH v5 10/15] soundwire: Add sysfs for SoundWire DisCo properties Vinod Koul
2017-12-13  9:15   ` Greg Kroah-Hartman
2017-12-13  9:54     ` Vinod Koul
2017-12-13 14:31       ` Pierre-Louis Bossart
2017-12-13 16:28       ` Greg Kroah-Hartman
2017-12-13 16:52         ` [alsa-devel] " Vinod Koul
2017-12-13 16:59           ` Greg Kroah-Hartman
2017-12-22  8:26             ` Vinod Koul
2017-12-22  8:33               ` Greg Kroah-Hartman
2017-12-22 11:43                 ` Vinod Koul [this message]
2017-12-22 15:20                   ` Greg Kroah-Hartman
2017-12-06 15:47 ` [PATCH v5 11/15] soundwire: cdns: Add cadence library Vinod Koul
2017-12-06 15:47 ` [PATCH v5 12/15] soundwire: cdns: Add sdw_master_ops and IO transfer support Vinod Koul
2017-12-06 15:47 ` [PATCH v5 13/15] soundwire: intel: Add Intel Master driver Vinod Koul
2017-12-06 15:47 ` [PATCH v5 14/15] soundwire: intel: Add Intel init module Vinod Koul
2017-12-06 15:47 ` [PATCH v5 15/15] MAINTAINERS: Add SoundWire entry Vinod Koul
2017-12-06 20:44 ` [PATCH v5 00/15] soundwire: Add a new SoundWire subsystem Philippe Ombredanne
2017-12-07  0:38 ` Pierre-Louis Bossart
2017-12-11 16:30 ` Takashi Iwai
2017-12-13  9:18 ` Greg Kroah-Hartman
2017-12-13  9:57   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171222114344.GS18649@localhost \
    --to=vinod.koul@intel.com \
    --cc=alan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches.audio@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=plai@codeaurora.org \
    --cc=sdharia@codeaurora.org \
    --cc=spapothi@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).