Kernel Newbies archive on lore.kernel.org
 help / Atom feed
* drivers: iio: Adding channels to the simple_dummy module
@ 2019-01-22 18:03 Bharath Vedartham
  2019-01-23 11:06 ` Himanshu Jha
  0 siblings, 1 reply; 8+ messages in thread
From: Bharath Vedartham @ 2019-01-22 18:03 UTC (permalink / raw)
  To: kernelnewbies

Hey everyone,

I am trying to get started with the IIO subsystem by doing the following tasks:

https://kernelnewbies.org/IIO_tasks

In task 3, which requires us to add 3 channels to the dummy_device, I
have added the structures in the dummy_channels array(which is of type
struct chan_spec), similar to the other channels in the dummy_channels
array.(in file drivers/iio/dummy/iio_simple_dummy.c)

I also added elements to the enum iio_simple_dummy_scan_elements for the
scan_index val.(in iio_simple_dummy.h)

I recompiled the kernel and loaded the modules iio_dummy and
iio_dummy_evgen using modprobe.

is the right approach. I am not able to see any new channels being
added to my /sys/bus/iio/devices/iio:device0/ directory?

printk is not printing to dmesg. I put printk in the probe function

Thank you,
Bharath

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-22 18:03 drivers: iio: Adding channels to the simple_dummy module Bharath Vedartham
@ 2019-01-23 11:06 ` Himanshu Jha
  2019-01-23 17:58   ` Bharath Vedartham
  0 siblings, 1 reply; 8+ messages in thread
From: Himanshu Jha @ 2019-01-23 11:06 UTC (permalink / raw)
  To: Bharath Vedartham; +Cc: kernelnewbies

On Tue, Jan 22, 2019 at 11:33:18PM +0530, Bharath Vedartham wrote:
> Hey everyone,
> 
> I am trying to get started with the IIO subsystem by doing the following tasks:
> 
> https://kernelnewbies.org/IIO_tasks
> 
> In task 3, which requires us to add 3 channels to the dummy_device, I
> have added the structures in the dummy_channels array(which is of type
> struct chan_spec), similar to the other channels in the dummy_channels
> array.(in file drivers/iio/dummy/iio_simple_dummy.c)
> 
> I also added elements to the enum iio_simple_dummy_scan_elements for the
> scan_index val.(in iio_simple_dummy.h)
> 
> I recompiled the kernel and loaded the modules iio_dummy and
> iio_dummy_evgen using modprobe.
> 
> is the right approach. I am not able to see any new channels being
> added to my /sys/bus/iio/devices/iio:device0/ directory?

Did you followed the configfs setup as illustrated in the aforementioned
link ?

Did the modules got loaded correctly ?

And if you're doing Task 3, I'd assume that the previous tasks were done
correctly ?

> printk is not printing to dmesg. I put printk in the probe function

Without any logs or diffs, it's hard to predict about where exactly
you're doing wrong.


Btw, we do have a IIO mailing list as well:
linux-iio@vger.kernel.org

-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-23 11:06 ` Himanshu Jha
@ 2019-01-23 17:58   ` Bharath Vedartham
  2019-01-24 10:51     ` Himanshu Jha
  0 siblings, 1 reply; 8+ messages in thread
From: Bharath Vedartham @ 2019-01-23 17:58 UTC (permalink / raw)
  To: Himanshu Jha; +Cc: kernelnewbies

On Wed, Jan 23, 2019 at 04:36:05PM +0530, Himanshu Jha wrote:
> On Tue, Jan 22, 2019 at 11:33:18PM +0530, Bharath Vedartham wrote:
> > Hey everyone,
> > 
> > I am trying to get started with the IIO subsystem by doing the following tasks:
> > 
> > https://kernelnewbies.org/IIO_tasks
> > 
> > In task 3, which requires us to add 3 channels to the dummy_device, I
> > have added the structures in the dummy_channels array(which is of type
> > struct chan_spec), similar to the other channels in the dummy_channels
> > array.(in file drivers/iio/dummy/iio_simple_dummy.c)
> > 
> > I also added elements to the enum iio_simple_dummy_scan_elements for the
> > scan_index val.(in iio_simple_dummy.h)
> > 
> > I recompiled the kernel and loaded the modules iio_dummy and
> > iio_dummy_evgen using modprobe.
> > 
> > is the right approach. I am not able to see any new channels being
> > added to my /sys/bus/iio/devices/iio:device0/ directory?
> 
> Did you followed the configfs setup as illustrated in the aforementioned
> link ?
> 
> Did the modules got loaded correctly ?
> 
> And if you're doing Task 3, I'd assume that the previous tasks were done
> correctly ?
> 
> > printk is not printing to dmesg. I put printk in the probe function
> 
> Without any logs or diffs, it's hard to predict about where exactly
> you're doing wrong.
> 
> 
> Btw, we do have a IIO mailing list as well:
> linux-iio@vger.kernel.org
> 
> -- 
> Himanshu Jha
> Undergraduate Student
> Department of Electronics & Communication
> Guru Tegh Bahadur Institute of Technology
Thank you for your time. I have started another thread where i have added a
diff. I am really not used to using mutt to add diffs,logs in it etc.
Please bear with me.

Thanks a lot,
Bharath

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-23 17:58   ` Bharath Vedartham
@ 2019-01-24 10:51     ` Himanshu Jha
  2019-01-25 11:41       ` Bharath Vedartham
  0 siblings, 1 reply; 8+ messages in thread
From: Himanshu Jha @ 2019-01-24 10:51 UTC (permalink / raw)
  To: Bharath Vedartham; +Cc: kernelnewbies

> Thank you for your time. I have started another thread where i have added a
> diff. I am really not used to using mutt to add diffs,logs in it etc.
> Please bear with me.

Well, you can try other email clients such as Evolution, Claws ...

There is no rule saying to use Mutt exclusively.


-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-24 10:51     ` Himanshu Jha
@ 2019-01-25 11:41       ` Bharath Vedartham
  2019-01-25 16:24         ` valdis.kletnieks
  0 siblings, 1 reply; 8+ messages in thread
From: Bharath Vedartham @ 2019-01-25 11:41 UTC (permalink / raw)
  To: Himanshu Jha; +Cc: kernelnewbies

On Thu, Jan 24, 2019 at 04:21:32PM +0530, Himanshu Jha wrote:
> > Thank you for your time. I have started another thread where i have added a
> > diff. I am really not used to using mutt to add diffs,logs in it etc.
> > Please bear with me.
> 
> Well, you can try other email clients such as Evolution, Claws ...
> 
> There is no rule saying to use Mutt exclusively.
> 
> 
> -- 
> Himanshu Jha
> Undergraduate Student
> Department of Electronics & Communication
> Guru Tegh Bahadur Institute of Technology
VM has low RAM. Need to adjust :)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-25 11:41       ` Bharath Vedartham
@ 2019-01-25 16:24         ` valdis.kletnieks
  2019-01-26  6:42           ` Bharath Vedartham
  0 siblings, 1 reply; 8+ messages in thread
From: valdis.kletnieks @ 2019-01-25 16:24 UTC (permalink / raw)
  To: Bharath Vedartham; +Cc: Himanshu Jha, kernelnewbies

On Fri, 25 Jan 2019 17:11:25 +0530, Bharath Vedartham said:
> On Thu, Jan 24, 2019 at 04:21:32PM +0530, Himanshu Jha wrote:
> > Well, you can try other email clients such as Evolution, Claws ...
> > 
> > There is no rule saying to use Mutt exclusively.

> VM has low RAM. Need to adjust :)

Upgrade the hypervisor system so the VM can be properly configured :)

(As a side note, few people send their diffs from inside their test VM.
They usually build outside the VM and copy the needed pieces into
a shared area that the build environment and the VM can both see.)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-25 16:24         ` valdis.kletnieks
@ 2019-01-26  6:42           ` Bharath Vedartham
  2019-01-26 18:39             ` valdis.kletnieks
  0 siblings, 1 reply; 8+ messages in thread
From: Bharath Vedartham @ 2019-01-26  6:42 UTC (permalink / raw)
  To: valdis.kletnieks; +Cc: Himanshu Jha, kernelnewbies

On Fri, Jan 25, 2019 at 11:24:33AM -0500, valdis.kletnieks@vt.edu wrote:
> On Fri, 25 Jan 2019 17:11:25 +0530, Bharath Vedartham said:
> > On Thu, Jan 24, 2019 at 04:21:32PM +0530, Himanshu Jha wrote:
> > > Well, you can try other email clients such as Evolution, Claws ...
> > > 
> > > There is no rule saying to use Mutt exclusively.
> 
> > VM has low RAM. Need to adjust :)
> 
> Upgrade the hypervisor system so the VM can be properly configured :)
> 
I think I ll rather build a native version. The reason I chose a VM was
cause I was told that if I break the kernel it would be much safer. But
I think GRUB will save my life if I screw things up. Thanks for your
time!
> (As a side note, few people send their diffs from inside their test VM.
> They usually build outside the VM and copy the needed pieces into
> a shared area that the build environment and the VM can both see.)
That is an interesting usecase. I wonder why they need to do that?

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: drivers: iio: Adding channels to the simple_dummy module
  2019-01-26  6:42           ` Bharath Vedartham
@ 2019-01-26 18:39             ` valdis.kletnieks
  0 siblings, 0 replies; 8+ messages in thread
From: valdis.kletnieks @ 2019-01-26 18:39 UTC (permalink / raw)
  To: Bharath Vedartham; +Cc: Himanshu Jha, kernelnewbies

On Sat, 26 Jan 2019 12:12:07 +0530, Bharath Vedartham said:
> On Fri, Jan 25, 2019 at 11:24:33AM -0500, valdis.kletnieks@vt.edu wrote:
> > On Fri, 25 Jan 2019 17:11:25 +0530, Bharath Vedartham said:
> > > VM has low RAM. Need to adjust :)
> > 
> > Upgrade the hypervisor system so the VM can be properly configured :)
> > 
> I think I ll rather build a native version. The reason I chose a VM was
> cause I was told that if I break the kernel it would be much safer. But
> I think GRUB will save my life if I screw things up. Thanks for your
> time!

Well, your /boot should be big enough at install time, and remember to keep
multiple versions around (mine is big enough to keep 3-4 known-good kernels and
up to 12-15 more during a git bisect).  And remember to take backups of your
system. (Seriously - the first time you do an 'rm *' in the wrong directory
will make up for the US$80 or so an external USB drive will cost you)

> > (As a side note, few people send their diffs from inside their test VM.
> > They usually build outside the VM and copy the needed pieces into
> > a shared area that the build environment and the VM can both see.)
> That is an interesting usecase. I wonder why they need to do that?

As I said, I know of very few (approximately zero) who send the diffs from
inside their test VM. The vast majority do the devel work outside and copy it.
About the only use case of sending from inside the VM I can think of is the
hypervisor being Windows HyperV. Though why somebody would be doing Linux
kernel devel in a Windows shop is beyond me. :)


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 18:03 drivers: iio: Adding channels to the simple_dummy module Bharath Vedartham
2019-01-23 11:06 ` Himanshu Jha
2019-01-23 17:58   ` Bharath Vedartham
2019-01-24 10:51     ` Himanshu Jha
2019-01-25 11:41       ` Bharath Vedartham
2019-01-25 16:24         ` valdis.kletnieks
2019-01-26  6:42           ` Bharath Vedartham
2019-01-26 18:39             ` valdis.kletnieks

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox