Swapnil Gaikwad | 1 Mar 2012 07:09
Picon

Metadata Copy

Hello,
     I am new in kernel programming. Help me in following.
 I am trying to write module in ext4 filesystem that takes a inode of one file and copy it's metadata into one new inode. Problem is to how to request new inode and what are the fields of metadata we can copy. Also problem with the time created ,modified fields in metadata .

--
    Regards,

Swapnil Gaikwad.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies <at> kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Pranay Kumar Srivastava | 1 Mar 2012 08:28
Favicon

Can't get Major and Minor number for device correctly.

Hi,

I've a kernel module which needs to get hold of the gen_disk structure. To make it a bit interactive I've a
user space program which uses stat sys call to get the respective device's dev_t number (I use s_rdev of the
struct stat) and pass it on to my module via an ioctl call. This part works good.

When my module tries to use the get_gendisk function it returns NULL. I printed out the MAJOR(dev_t) and
MINOR(dev_t) and was surprised to get the value 0 for MAJOR(dev_t). A little more digging got me to this
code snippet, the file is kdev_t.h

-----------------------------------------------------------%------------------------------------------------------------

#ifdef __KERNEL__
#define MINORBITS       20
#define MINORMASK       ((1U << MINORBITS) - 1)

#define MAJOR(dev)      ((unsigned int) ((dev) >> MINORBITS))
#define MINOR(dev)      ((unsigned int) ((dev) & MINORMASK))
#define MKDEV(ma,mi)    (((ma) << MINORBITS) | (mi))
.....

#else /* __KERNEL__ */

/*
Some programs want their definitions of MAJOR and MINOR and MKDEV
from the kernel sources. These must be the externally visible ones.
*/
#define MAJOR(dev)      ((dev)>>8)
#define MINOR(dev)      ((dev) & 0xff)
#define MKDEV(ma,mi)    ((ma)<<8 | (mi))
#endif /* __KERNEL__ */

-----------------------------------------------------------%------------------------------------------------------------

Since __KERNEL__ is defined in the topmost Makefile, the first definition of macros would be used which is
giving me the wrong result. But what I really want is the #else one.

Surprisingly doing a major and minor in user space works. I traced it back to the following code snippet, in
file /usr/include/sys/sysmacros.h

-----------------------------------------------------------%------------------------------------------------------------

# if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES
__extension__ __extern_inline unsigned int
__NTH (gnu_dev_major (unsigned long long int __dev))
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

__extension__ __extern_inline unsigned int
__NTH (gnu_dev_minor (unsigned long long int __dev))
{
  return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}
....
#endif

# define major(dev) gnu_dev_major (dev)
# define minor(dev) gnu_dev_minor (dev)

-----------------------------------------------------------%------------------------------------------------------------

So basically the user space code doing stat and then major/minor works because its doing the dev_t>>8.

My questions are,

 1. How does MAJOR, MINOR are able to work within kernel with 32 bit definitions?, since dev_t>>20 would make
the major number 0 and get_gendisk should then fail and most of the devices listed like my disks don't
report a quite big dev_t when I do stat on them.

 2. Should I be checking for wether or not 32 bits dev_t is in effect? But if I've to do this what's the purpose of
using the macros MAJOR and MINOR? Aren't these there to do the same job?

As an example, doing stat reported stat.s_rdev field to be 2065, which accordingly translate to 8,17.

I'm using SLES 11 SP1, kernel 2.6.32

Regards,
Pranay Kr. Srivastava
pranay.shrivastava <at> hcl.com
Software Engineer
ERS,HCL Technologies
A-5, Sector 24, Noida 201301, U.P. (India)

::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named
recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions
presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or
publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
Manavendra Nath Manav | 1 Mar 2012 11:18
Picon
Gravatar

Re: Linux cdc-acm-driver

On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
<stefan.dreyer <at> ddnetservice.net> wrote:
> Hi,
>
> allthough the answer is offtopic for cdc-acm-driver, i will answer, because
> maybe it helps other people in future.

> I can tell you exactly, what is going on. If the scanner switches to
> ProductId=0720 (0c2e:0720) the scanner is working in Serial-Mode. If you
> want the scanner let work as serial device, you have to use the driver
> metro-usb. The manufacturer has this driver, but that one is outdatet and
> doesn't compile on actual Linux kernel.
> I found an actual driver, which compiles even with kernel 3.2
> <https://gitorious.org/other/metro-usb/commits/master>

Thanks a lot for the prompt reply, this should adequately solve my
problem. I am able to download the driver source and compile. However,
I have run into a trivial module format error.

[root <at> pe1800xs serial]# modinfo metro-usb.ko
filename:       metro-usb.ko
description:    Metrologic Instruments Inc. - USB-POS driver
author:         Aleksey Babahin <tamerlan311 <at> gmail.com>
author:         Philip Nicastro
license:        GPL
srcversion:     AF4C7DDE2804EBB1578A05F
alias:          usb:v0C2Ep0710d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0C2Ep0720d*dc*dsc*dp*ic*isc*ip*
depends:        usbserial
vermagic:       2.6.35.6-45.fc14.i686 SMP mod_unload modversions 686
parm:           debug:Print debug info (bool 1=on, 0=off) (bool)
parm:           vendor:User specified vendor ID (ushort) (ushort)
parm:           product:User specified product ID (ushort) (ushort)

[root <at> pe1800xs serial]# modprobe -f -v metro-usb
insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko
FATAL: Error inserting metro_usb
(/lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko):
Invalid module format

[root <at> pe1800xs serial]# uname -a
Linux pe1800xs 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC
2010 i686 i686 i386 GNU/Linux

[root <at> pe1800xs serial]# dmesg
[84119.755750] metro_usb: version magic '2.6.35.6-45.fc14.i686 SMP
mod_unload modversions 686 ' should be '2.6.35.6-45.fc14.i686 SMP
mod_unload 686 '

I am running Fedora14 with "Force module loading option disabled". How
can I turn it ON without recompiling the kernel. Or, since I have the
souce files of the driver (attached), how can I modify the metro-usb.c
file to provide suitable "module version".

--
Manavendra Nath Manav
Attachment (Makefile): application/octet-stream, 837 bytes
Attachment (metro-usb.c): text/x-csrc, 19 KiB
Attachment (metro-usb.h): text/x-chdr, 1809 bytes
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies <at> kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Mayank Agarwal | 1 Mar 2012 13:27
Picon

linux camera drivers

Hi all,
 
I have following questions regarding camera drivers in linux kernel.

1.which are the files/folder in kernel directory where camera drivers support is provided in linux kernel.
2.Are they customisable according to different SOC requirements.
3.Are there any tutorials/pdfs to understand camera drivers in linux kernel.
4.At present which sensor (i mean aptina/sony/omnivision) drivers are supported in linux kernel.

Thanks and Regards,
Mayank

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies <at> kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Greg KH | 1 Mar 2012 15:52
Gravatar

Re: linux camera drivers

On Thu, Mar 01, 2012 at 05:57:52PM +0530, Mayank Agarwal wrote:
> Hi all,
>  
> I have following questions regarding camera drivers in linux kernel.
> 
> 1.which are the files/folder in kernel directory where camera drivers support
> is provided in linux kernel.

It depends, which type of protocol does your device support?

> 2.Are they customisable according to different SOC requirements.

It depends on what the requirements are.  As it's software, it's always
able to be changed :)

> 3.Are there any tutorials/pdfs to understand camera drivers in linux kernel.

What is wrong with the code itself?

> 4.At present which sensor (i mean aptina/sony/omnivision) drivers are supported
> in linux kernel.

What sensor are you looking for exactly?

What device do you need to support, and what protocol does your camera
use to talk to the hardware?

greg k-h
Greg KH | 1 Mar 2012 19:29
Favicon
Gravatar

Re: Can't get Major and Minor number for device correctly.

On Thu, Mar 01, 2012 at 12:58:13PM +0530, Pranay Kumar Srivastava wrote:
> Hi,
> 
> I've a kernel module which needs to get hold of the gen_disk
> structure.

Wait, stop there, why do you need to do this?  And why are you trying to
do this by a major/minor number?  What is the root problem you are
trying to solve here?

> To make it a bit interactive I've a user space program which uses stat
> sys call to get the respective device's dev_t number (I use s_rdev of
> the struct stat) and pass it on to my module via an ioctl call. This
> part works good.
> 
> When my module tries to use the get_gendisk function it returns NULL. I printed out the MAJOR(dev_t) and
MINOR(dev_t) and was surprised to get the value 0 for MAJOR(dev_t). A little more digging got me to this
code snippet, the file is kdev_t.h

As you have found out, you can't pass a userspace dev_t to the kernel
and expect it to work properly.  Try passing a major/minor number and
using the proper internal macros instead, that should work.

greg k-h
Greg KH | 2 Mar 2012 01:29
Favicon
Gravatar

Re: Linux cdc-acm-driver

On Thu, Mar 01, 2012 at 03:48:57PM +0530, Manavendra Nath Manav wrote:
> On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
> <stefan.dreyer <at> ddnetservice.net> wrote:
> > Hi,
> >
> > allthough the answer is offtopic for cdc-acm-driver, i will answer, because
> > maybe it helps other people in future.
> 
> > I can tell you exactly, what is going on. If the scanner switches to
> > ProductId=0720 (0c2e:0720) the scanner is working in Serial-Mode. If you
> > want the scanner let work as serial device, you have to use the driver
> > metro-usb. The manufacturer has this driver, but that one is outdatet and
> > doesn't compile on actual Linux kernel.
> > I found an actual driver, which compiles even with kernel 3.2
> > <https://gitorious.org/other/metro-usb/commits/master>
> 
> Thanks a lot for the prompt reply, this should adequately solve my
> problem. I am able to download the driver source and compile. However,
> I have run into a trivial module format error.
> 
> [root <at> pe1800xs serial]# modinfo metro-usb.ko
> filename:       metro-usb.ko
> description:    Metrologic Instruments Inc. - USB-POS driver
> author:         Aleksey Babahin <tamerlan311 <at> gmail.com>
> author:         Philip Nicastro
> license:        GPL
> srcversion:     AF4C7DDE2804EBB1578A05F
> alias:          usb:v0C2Ep0710d*dc*dsc*dp*ic*isc*ip*
> alias:          usb:v0C2Ep0720d*dc*dsc*dp*ic*isc*ip*
> depends:        usbserial
> vermagic:       2.6.35.6-45.fc14.i686 SMP mod_unload modversions 686
> parm:           debug:Print debug info (bool 1=on, 0=off) (bool)
> parm:           vendor:User specified vendor ID (ushort) (ushort)
> parm:           product:User specified product ID (ushort) (ushort)

Aleksey, any reason this driver hasn't been submitted upstream yet?  If
you don't mind, I'll be glad to forward port it and get it merged to the
main kernel.org tree.  Or is there some reason we can't do that?

thanks,

greg k-h
Manavendra Nath Manav | 2 Mar 2012 10:05
Picon
Gravatar

Re: Linux cdc-acm-driver

Hi Stefan

On Thu, Mar 1, 2012 at 7:51 PM, Stefan Dreyer
<stefan.dreyer <at> ddnetservice.net> wrote:
> Hi,
>
>
>
> Am 01.03.2012 14:57, schrieb Manavendra Nath Manav:
>
>> The Metrologic scanner is working perfectly in bi-directional serial
>> mode. But when I configure it as USB HID Keyboard mode as shown in the
>> link and keyboard layout as US-English, I am not getting any data from
>> Scanner. I have opened a terminal and scanned multiple barcodes but no
>> output on screen.
>>
>> [root <at> pe1800xs e518816]# dmesg
>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>> Scanning and Mobility Scanner as
>> /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>> Mobility Scanner] on usb-0000:00:1d.1-2/input0
>>
>> [root <at> pe1800xs e518816]# lsusb -v
>> Bus 007 Device 020: ID 0c2e:0200 Metro Metrologic Scanner
>> [root <at> pe1800xs e518816]# cat /proc/bus/usb/devices
>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>> S:  Manufacturer=Honeywell Scanning and Mobility
>> S:  Product=Honeywell Scanning and Mobility Scanner
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>
>> Can you help me in getting data from Scanner in USB HID Keyboard
>> Emulation mode as this would reduce the burden of using an extra
>> driver and the application program can read directly from the
>> emulation keyboard instead of listening to serial device.
>
>
> For me, that looks good. But i never have any problems using the scanner in
> Keyboard-Mode. Are all the necessary drivers loaded
> (usbcore,hid,usbhid,...)
> What happens, if you plug a new USB-Keyboard in. Does it works? Did you try
> to recall factory-settings before? Maybe the Keyboard-mode is disabled
> somewhere else.
>
> you can test all the input-devices, in directory /dev/input there must be
> device-files named event0 ... eventN (You could identify it via directory:
> /dev/input/by-id, if you have it on fedora 14)
> you can test them via
> # cat /dev/input/event9 | hexdump
> If you scan codes, the hexdump of the keycodes is shown.
>

I scanned all the required bar-codes to make Metrologic MS1690 work as
USB HID Keyboard, it is being detected and driver usbhid attached to
it, but I am not able to see any output on console. The output is fine
when it is configured in serial mode. However, hexdump shows keycodes.
I attached another standard USB Dell keyboard and it is working fine.

[98498.945783] input: Honeywell Scanning and Mobility Honeywell
Scanning and Mobility Scanner as
/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input20
[98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
Mobility Scanner] on usb-0000:00:1d.1-2/input0

[root <at> pe1800xs input]# cat /proc/bus/usb/devices
T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0c2e ProdID=0200 Rev=58.88
S:  Manufacturer=Honeywell Scanning and Mobility
S:  Product=Honeywell Scanning and Mobility Scanner
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

[root <at> pe1800xs ~]# ll /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 9 Feb 29 15:46
usb-Dell_Dell_QuietKey_Keyboard-event-kbd -> ../event2
lrwxrwxrwx 1 root root 9 Feb 29 17:17
usb-Dell_Dell_USB_Entry_Keyboard-event-kbd -> ../event5
lrwxrwxrwx 1 root root 9 Mar  1 19:10
usb-Honeywell_Scanning_and_Mobility_Honeywell_Scanning_and_Mobility_Scanner-event-kbd
-> ../event6

[root <at> pe1800xs input]# cat event6 | hexdump
0000000 8be0 4f50 ef90 0009 0004 0004 0027 0007
0000010 8be0 4f50 ef97 0009 0001 000b 0001 0000
0000020 8be0 4f50 ef98 0009 0000 0000 0000 0000
0000030 8be0 4f50 0ecf 000a 0004 0004 0027 0007
0000040 8be0 4f50 0ed4 000a 0001 000b 0000 0000
0000050 8be0 4f50 0ed5 000a 0000 0000 0000 0000
*** snip ***

I am getting hexdump after scanning bar-codes, but why it is not
coming on console as it should like a standard keyboard.

--

-- 
Manavendra Nath Manav
Manavendra Nath Manav | 2 Mar 2012 11:36
Picon
Gravatar

Re: Linux cdc-acm-driver

On Fri, Mar 2, 2012 at 2:50 PM, Stefan Dreyer
<stefan.dreyer <at> ddnetservice.net> wrote:
> Hi,
>
> Am 02.03.2012 10:05, schrieb Manavendra Nath Manav:
>
>> Hi Stefan
>>
>> On Thu, Mar 1, 2012 at 7:51 PM, Stefan Dreyer
>> <stefan.dreyer <at> ddnetservice.net>  wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> Am 01.03.2012 14:57, schrieb Manavendra Nath Manav:
>>>
>>>> The Metrologic scanner is working perfectly in bi-directional serial
>>>> mode. But when I configure it as USB HID Keyboard mode as shown in the
>>>> link and keyboard layout as US-English, I am not getting any data from
>>>> Scanner. I have opened a terminal and scanned multiple barcodes but no
>>>> output on screen.
>>>>
>>>> [root <at> pe1800xs e518816]# dmesg
>>>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>>>> Scanning and Mobility Scanner as
>>>> /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>>>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>>>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>>>> Mobility Scanner] on usb-0000:00:1d.1-2/input0
>>>>
>>>> [root <at> pe1800xs e518816]# lsusb -v
>>>> Bus 007 Device 020: ID 0c2e:0200 Metro Metrologic Scanner
>>>> [root <at> pe1800xs e518816]# cat /proc/bus/usb/devices
>>>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>>>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>>>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>>>> S:  Manufacturer=Honeywell Scanning and Mobility
>>>> S:  Product=Honeywell Scanning and Mobility Scanner
>>>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>>>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>>>
>>>> Can you help me in getting data from Scanner in USB HID Keyboard
>>>> Emulation mode as this would reduce the burden of using an extra
>>>> driver and the application program can read directly from the
>>>> emulation keyboard instead of listening to serial device.
>>>
>>>
>>>
>>> For me, that looks good. But i never have any problems using the scanner
>>> in
>>> Keyboard-Mode. Are all the necessary drivers loaded
>>> (usbcore,hid,usbhid,...)
>>> What happens, if you plug a new USB-Keyboard in. Does it works? Did you
>>> try
>>> to recall factory-settings before? Maybe the Keyboard-mode is disabled
>>> somewhere else.
>>>
>>> you can test all the input-devices, in directory /dev/input there must be
>>> device-files named event0 ... eventN (You could identify it via
>>> directory:
>>> /dev/input/by-id, if you have it on fedora 14)
>>> you can test them via
>>> # cat /dev/input/event9 | hexdump
>>> If you scan codes, the hexdump of the keycodes is shown.
>>>
>>
>> I scanned all the required bar-codes to make Metrologic MS1690 work as
>> USB HID Keyboard, it is being detected and driver usbhid attached to
>> it, but I am not able to see any output on console. The output is fine
>> when it is configured in serial mode. However, hexdump shows keycodes.
>> I attached another standard USB Dell keyboard and it is working fine.
>>
>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>> Scanning and Mobility Scanner as
>> /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>> Mobility Scanner] on usb-0000:00:1d.1-2/input0
>>
>> [root <at> pe1800xs input]# cat /proc/bus/usb/devices
>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>> S:  Manufacturer=Honeywell Scanning and Mobility
>> S:  Product=Honeywell Scanning and Mobility Scanner
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>
>> [root <at> pe1800xs ~]# ll /dev/input/by-id/
>> total 0
>> lrwxrwxrwx 1 root root 9 Feb 29 15:46
>> usb-Dell_Dell_QuietKey_Keyboard-event-kbd ->  ../event2
>> lrwxrwxrwx 1 root root 9 Feb 29 17:17
>> usb-Dell_Dell_USB_Entry_Keyboard-event-kbd ->  ../event5
>> lrwxrwxrwx 1 root root 9 Mar  1 19:10
>>
>> usb-Honeywell_Scanning_and_Mobility_Honeywell_Scanning_and_Mobility_Scanner-event-kbd
>> ->  ../event6
>>
>> [root <at> pe1800xs input]# cat event6 | hexdump
>> 0000000 8be0 4f50 ef90 0009 0004 0004 0027 0007
>> 0000010 8be0 4f50 ef97 0009 0001 000b 0001 0000
>> 0000020 8be0 4f50 ef98 0009 0000 0000 0000 0000
>> 0000030 8be0 4f50 0ecf 000a 0004 0004 0027 0007
>> 0000040 8be0 4f50 0ed4 000a 0001 000b 0000 0000
>> 0000050 8be0 4f50 0ed5 000a 0000 0000 0000 0000
>> *** snip ***
>>
>> I am getting hexdump after scanning bar-codes, but why it is not
>> coming on console as it should like a standard keyboard.
>
>
> If you get the hexdump, your scanner is configured and working correctly.
> There must be a problem with your console or your X-configuration.
>
>

Thanks Stefan, you are right that if I get hexdump then the scanner is
working properly. This test was failing before because I was trying to
get barcodes over Putty terminal emulation which is basically a SSH
session and will not display the keyboard inputs from the host
machine. When I checked on the host machine, it’s working properly.

Thanks a tonne !!!
Manavendra Nath Manav
Mayank Agarwal | 3 Mar 2012 05:21
Picon

Re: linux camera drivers



On Fri, Mar 2, 2012 at 10:08 AM, Mayank Agarwal <mayank77fromindia <at> gmail.com> wrote:
1.I think the device supports i2c or spi protocol.I want to know how the i2c or spi is taking data
 from image sensor and giving it to video buffers.

2.I want to understand the whole data flow from image sensor to the display buffer and the role of linux kernel
camera drivers in that.

3.Currently i am looking at Sony IMX036,Aptima MT9P031.

Thanks and Regards,
Mayank


On Thu, Mar 1, 2012 at 8:22 PM, Greg KH <greg <at> kroah.com> wrote:
On Thu, Mar 01, 2012 at 05:57:52PM +0530, Mayank Agarwal wrote:
> Hi all,
>  
> I have following questions regarding camera drivers in  linux kernel.
>
> 1.which are the files/folder in kernel directory where camera drivers support
> is provided in linux kernel.

It depends, which type of protocol does your device support?

> 2.Are they customisable according to different SOC requirements.

It depends on what the requirements are.  As it's software, it's always
able to be changed :)

> 3.Are there any tutorials/pdfs to understand camera drivers in linux kernel.

What is wrong with the code itself?

> 4.At present which sensor (i mean aptina/sony/omnivision) drivers are supported
> in linux kernel.

What sensor are you looking for exactly?

What device do you need to support, and what protocol does your camera
use to talk to the hardware?

greg k-h


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies <at> kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Gmane