linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Armin Steinhoff <armin@steinhoff.de>
To: "Hans J. Koch" <hjk@linutronix.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: UIO and Fedora 13  (kernel 33.6)
Date: Wed, 01 Sep 2010 23:40:05 +0200	[thread overview]
Message-ID: <4C7EC835.7080707@steinhoff.de> (raw)
In-Reply-To: <20100901185620.GA2514@local>


Hi,

many thanks for your support ... I have in the meantime a working version.
Would you please implement your advices into the misleading examples of 
UIO ?

Cheers

--Armin



Hans J. Koch wrote:
> On Wed, Sep 01, 2010 at 09:31:39AM +0200, Armin Steinhoff wrote:
>> Small correction ... I don't mean the "initial platform_data" but
>> the initial resource data of the platform driver.
>>
>> --Armin
>>
>>
>>    Hans J. Koch wrote:
>>> After a successfull uio_register_device() there is both a /dev/uioX
>>> and a directory /sys/class/uio/uioX/.
>> In the attachment is an updated version of uio_jand.
>>
>> The module uio_jand.ko can be inserted and removed,  no messages
>> visible by dmesg, no kernel oops, no dev/uio*  and no class entries
>> available.
>>
>> There are only entries of uio_jand in /sys/module,
>> /sys/bus/platform/drivers and /sys/uio/holders ... I'm really
>> confused =:-/
>>
>> It's completely unclear how to write the initial platform_data of
>> the platform device in the example uio_smx.c :
>>
>>       regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
>>       if (!regs) {
>>           dev_err(&dev->dev, "No memory resource specified\n");
>>           goto out_free;
>>
>> Same issue in uio_platform_genirq ...
> You only seem to be working on x86 ... ;-)
>
> If you register a platform driver, you also need to register a platform
> device with the same name, otherwise your driver's probe() function will
> never be called. In struct platform_device you can also specify an array
> of resources (e.g. memory, interrupts) which can be queried by the driver
> in the way you quoted above.
>
> The ARM architecture (for example) uses a specific board support file for
> each board that sets up (among other things) these platform devices.
> (See arch/arm/mach-xxx/board-yyy.c for examples)
>
> Other archs like PowerPC use the OpenFirmware/DeviceTree interface to set up
> such board specific things. On x86, there's no real solution yet since all
> such boards used to be more or less "PC compatible". Platform devices exist
> only in low level arch code, all special devices (or those added by the user)
> announce themselves as PCI devices, are controllable from userspace
> (e.g. I2C, SPI) or have another interface that allows auto probing (e.g. USB).
>
> The first version of your driver did the right thing by using
> platform_device_register_simple() and driver_register(). That avoids the
> need for a separate file which calls platform_device_register().
>
> So, go back to your first version, and fix the real bugs.
>
> Thanks,
> Hans
>
>


  reply	other threads:[~2010-09-01 21:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 18:23 reiserfs issue with 2.6.32.8 Bret Towe
2010-02-14 23:27 ` Rafael J. Wysocki
2010-02-15  6:39 ` Christian Kujau
     [not found]   ` <dda83e781002142245l5c95d08bu214a796be289eb22@mail.gmail.com>
2010-02-15  6:46     ` Bret Towe
2010-08-30 10:49       ` UIO and Fedora 13 (kernel 33.6) Armin Steinhoff
2010-08-30 16:24         ` Hans J. Koch
2010-08-31  6:57           ` Armin Steinhoff
2010-08-31 10:35             ` Hans J. Koch
2010-08-31 13:23               ` Armin Steinhoff
2010-09-01  7:31               ` Armin Steinhoff
2010-09-01 18:56                 ` Hans J. Koch
2010-09-01 21:40                   ` Armin Steinhoff [this message]
2010-09-01 22:14                     ` Hans J. Koch
2010-08-30 11:07       ` UIO and Fedora 13 (kernel 33.6) / kernel module corrected Armin Steinhoff
2010-02-24  5:31   ` reiserfs issue with 2.6.32.8 Bret Towe
2010-02-24  7:03     ` Christian Kujau
2010-02-25  2:17       ` Bret Towe
2010-03-04  3:00       ` Bret Towe
2010-03-04 21:37         ` Christian Kujau
2010-03-04 22:53           ` Bret Towe
2010-03-05  7:36             ` Christian Kujau

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=4C7EC835.7080707@steinhoff.de \
    --to=armin@steinhoff.de \
    --cc=hjk@linutronix.de \
    --cc=linux-kernel@vger.kernel.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).