All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Franziska Näpelt" <franziska.naepelt@googlemail.com>
To: linux-iio@vger.kernel.org
Subject: iio dummy device doesn't appear in /sys/bus/iio/devices/
Date: Mon, 5 Jun 2017 16:33:26 +0200	[thread overview]
Message-ID: <B51FF1E9-D555-4B6E-92E8-4529C999CF5A@googlemail.com> (raw)

Hi,

I=E2=80=99m just playing around with iio dummy drivers and couldn=E2=80=99=
t get it work with kernel 4.9 while everything was fine with=20
kernel 4.4.

Steps for kernel 4.4:
* edit Kconfig to create IIO_SIMPLE_DUMMY module
* build and install kernel
* edit /etc/modules to load iio_dummy
* after reboot there is an iio_dummy module loaded and the device =
appears in sysfs

Steps for kernel 4.9:
* edit Kconfig to create IIO_SW_DEVICE, IIO_SIMPLE_DUMMY, =
IIO_SIMPLE_DUMMY_BUFFER modules
* build and install kernel
* edit /etc/modules to load iio_dummy
* after reboot there is an iio_dummy module loaded but doesn=E2=80=99t =
appear in sysfs

Is there something wrong with the order, loading modules or do I miss =
some dependencies?

Thanks,
Franziska

Here are some more detailed information, as first kernel 4.4, then 4.9:

Linux raspberrypi-3 4.4.50-v7+ #1 SMP Fri Jun 2 00:19:42 CEST 2017 =
armv7l GNU/Linux
---
pi@raspberrypi-3:~/projects $ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

iio_dummy
---
pi@raspberrypi-3:~/projects/raspi-linux $ git diff =
drivers/staging/iio/Kconfig
diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig
index 9d7f000..42d03a3 100644
--- a/drivers/staging/iio/Kconfig
+++ b/drivers/staging/iio/Kconfig
@@ -23,6 +23,7 @@ config IIO_DUMMY_EVGEN
=20
 config IIO_SIMPLE_DUMMY
        tristate "An example driver with no hardware requirements"
+          default y
        help
         Driver intended mainly as documentation for how to write
         a driver. May also be useful for testing userspace code
---
pi@raspberrypi-3:~/projects $ lsmod=20
Module                  Size  Used by
bnep                   10340  2=20
hci_uart               17943  1=20
btbcm                   5929  1 hci_uart
bluetooth             326067  22 bnep,btbcm,hci_uart
brcmfmac              186282  0=20
brcmutil                5661  1 brcmfmac
cfg80211              428833  1 brcmfmac
rfkill                 16018  4 cfg80211,bluetooth
snd_bcm2835            20447  0=20
snd_pcm                75890  1 snd_bcm2835
snd_timer              19288  1 snd_pcm
bcm2835_gpiomem         2976  0=20
snd                    51908  3 snd_bcm2835,snd_timer,snd_pcm
bcm2835_wdt             3225  0=20
uio_pdrv_genirq         3164  0=20
uio                     8000  1 uio_pdrv_genirq
iio_dummy               3072  0=20
industrialio           33826  1 iio_dummy
ipv6                  347563  32=20
---
pi@raspberrypi-3:/sys/bus/iio/devices/iio:device0 $ ll
insgesamt 0
drwxr-xr-x  3 root root    0 Jun  4 13:42 .
drwxr-xr-x 10 root root    0 Jun  4 13:42 ..
-r--r--r--  1 root root 4,0K Jun  4 13:42 dev
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_accel_x_calibbias
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_accel_x_calibscale
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_accel_x_raw
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_activity_running_input
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_activity_walking_input
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_sampling_frequency
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_steps_calibheight
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_steps_en
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_steps_input
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_voltage0_offset
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_voltage0_raw
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_voltage0_scale
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_voltage1-voltage2_raw
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_voltage3-voltage4_raw
-rw-r--r--  1 root root 4,0K Jun  4 13:42 in_voltage-voltage_scale
-r--r--r--  1 root root 4,0K Jun  4 13:42 name
-rw-r--r--  1 root root 4,0K Jun  4 13:42 out_voltage0_raw
drwxr-xr-x  2 root root    0 Jun  4 13:42 power
lrwxrwxrwx  1 root root    0 Jun  4 13:42 subsystem -> ../../bus/iio
-rw-r--r--  1 root root 4,0K Jun  4 13:42 uevent
=
--------------------------------------------------------------------------=
-----------------------------------------------
Linux raspberrypi-3 4.9.30-v7+ #1 SMP Sun Jun 4 21:07:31 CEST 2017 =
armv7l GNU/Linux
---
/etc/modules -> is the same
---=20
pi@raspberrypi-3:~/projects/raspi-linux $ git diff drivers/iio/Kconfig=20=

diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
index 6743b18..e804f63 100644
--- a/drivers/iio/Kconfig
+++ b/drivers/iio/Kconfig
@@ -49,6 +49,7 @@ config IIO_CONSUMERS_PER_TRIGGER
 config IIO_SW_DEVICE
        tristate "Enable software IIO device support"
        select IIO_CONFIGFS
+       default y
        help
         Provides IIO core support for software devices. A software
         device can be created via configfs or directly by a driver
---
pi@raspberrypi-3:~/projects/raspi-linux $ git diff =
drivers/iio/dummy/Kconfig
diff --git a/drivers/iio/dummy/Kconfig b/drivers/iio/dummy/Kconfig
index aa5824d..1eb7991 100644
--- a/drivers/iio/dummy/Kconfig
+++ b/drivers/iio/dummy/Kconfig
@@ -11,6 +11,7 @@ config IIO_DUMMY_EVGEN
 config IIO_SIMPLE_DUMMY
        tristate "An example driver with no hardware requirements"
        depends on IIO_SW_DEVICE
+          default y
        help
         Driver intended mainly as documentation for how to write
         a driver. May also be useful for testing userspace code
@@ -29,6 +30,7 @@ config IIO_SIMPLE_DUMMY_BUFFER
        select IIO_BUFFER
        select IIO_TRIGGER
        select IIO_KFIFO_BUF
+       default y
        help
          Add buffered data capture to the simple dummy driver.
---
pi@raspberrypi-3:~/projects/raspi-linux $ lsmod=20
Module                  Size  Used by
bnep                   12051  2=20
hci_uart               20020  1=20
btbcm                   7916  1 hci_uart
bluetooth             365473  22 hci_uart,bnep,btbcm
brcmfmac              222798  0=20
brcmutil                9092  1 brcmfmac
cfg80211              542989  1 brcmfmac
rfkill                 20832  4 bluetooth,cfg80211
snd_bcm2835            24427  0=20
snd_pcm                98565  1 snd_bcm2835
snd_timer              23904  1 snd_pcm
bcm2835_gpiomem         3940  0=20
snd                    70032  3 snd_timer,snd_bcm2835,snd_pcm
uio_pdrv_genirq         3923  0=20
fixed                   3285  0=20
uio                    10268  1 uio_pdrv_genirq
iio_dummy               4984  0=20
industrialio_sw_device     3691  1 iio_dummy
industrialio_configfs     1370  1 industrialio_sw_device
kfifo_buf               3668  1 iio_dummy
industrialio           62929  2 iio_dummy,kfifo_buf
ipv6                  408530  32=20
---
pi@raspberrypi-3:/sys/bus/iio/devices $ ll
insgesamt 0
drwxr-xr-x 2 root root 0 Jun  5 15:33 .
drwxr-xr-x 4 root root 0 Jun  5 15:33 ..





             reply	other threads:[~2017-06-05 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 14:33 Franziska Näpelt [this message]
2017-06-05 17:41 ` iio dummy device doesn't appear in /sys/bus/iio/devices/ Franziska Näpelt
2017-06-05 19:46   ` Jonathan Cameron
2017-06-06 18:03     ` Franziska Naepelt
2017-06-11 13:56       ` Jonathan Cameron
2017-06-18 17:37         ` Alison Schofield

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=B51FF1E9-D555-4B6E-92E8-4529C999CF5A@googlemail.com \
    --to=franziska.naepelt@googlemail.com \
    --cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.