kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kaiser <lists@kaiser.cx>
To: kernelnewbies@kernelnewbies.org
Subject: Re: Accessing rpmsg_device in sysfs attribute functions
Date: Tue, 24 Mar 2020 10:49:46 +0100	[thread overview]
Message-ID: <20200324094946.cepooc4y4qa2luey@viti.kaiser.cx> (raw)
In-Reply-To: <20200324063113.GA1978604@kroah.com>

Hi Greg,

Thus wrote Greg KH (greg@kroah.com):

> That is because you have created a driver attribute, not a device
> attribute.  Create device attributes and you should be fine, they bind
> to the device your driver is passed.

could you point me to an example in the kernel tree where this is done
correctly for a platform device?

I had a look at

http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/

but I couldn't figure out how to create device attributes in a simple
platform driver that binds to a platform device.

Thanks a lot for your help,

   Martin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-03-24  9:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24  5:34 Accessing rpmsg_device in sysfs attribute functions Pelle Windestam
2020-03-24  6:31 ` Greg KH
2020-03-24  9:49   ` Martin Kaiser [this message]
2020-03-24 10:23     ` Greg KH
2020-03-24 12:02   ` Pelle Windestam
2020-03-24 12:31     ` Greg KH
2020-03-24 13:05       ` Pelle Windestam
2020-03-24 13:15         ` Greg KH
2020-03-24 13:35           ` Pelle Windestam

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=20200324094946.cepooc4y4qa2luey@viti.kaiser.cx \
    --to=lists@kaiser.cx \
    --cc=kernelnewbies@kernelnewbies.org \
    /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).