@Peter
Yes, i have read that. It says directly addressable but it's not like i can access those addresses straight from user space. So how do i access them . In the above case how do i access the register of the wm97 codec ic which is on an AC97 bus? Your suggestion is not exactly clear. I understand i have to write a kernel module. I guess the functions you are referring to are already exported by that driver code.
----------------------------------------------------------------------------------------------------------------------------------------
For my case, i was interested in reading the ADC values using four auxiliary ADC's provided by the WM97 codec IC. If you look at the driver code file, it has a function for reading the WM97 registers as well as the auxiliary ADC's. I wanted to use them. Thanks & Regards,
Sanchayan.
Sanchayan.
On Sun, Nov 10, 2013 at 2:02 AM, anish singh <anish198519851985@xxxxxxxxx> wrote:
> http://lxr.free-electrons.com/sourcep/drivers/input/touchscreen/wm97xx-core.c
On Nov 9, 2013 4:18 AM, "sanchayan maity" <victorascroft@xxxxxxxxx> wrote:
>
> Can someone give me some pointers or tell me as to how can one use a platform driver for reading and writing?
>
> For example, if i have a wm97xx codec IC, a core platform driver is provided (as on the below link).
This is a touch driver\input driver.
So this driver comes under input subsystem.It interacts with input core to send events to it using report api's.What is the original problem you are trying to solve?You can do read\write just by a small hack.Write a kernel module and make the read\write function in this driver as exported.Use those in your own driver but make sure you export other variables also to give the right inputs for those api's.I am sure you are just looking for writing a device driver by doing an actual read\write.Remember this will just be a bad code i.e. hack.
>
> If i wanted to use this core driver to read the auxilary ADC's of wm97xx codec how do i go about using the register read, write functions or read auxiliary adc functions provided by this driver file?
>
> I have gone through the documentation provided here http://lxr.free-electrons.com/source/Documentation/driver-model/ but it is still not clear to me. I understand the concept of why a platform driver is required and how each device registers itself with the pseudo platform bus, but, i do not understand how to use such a driver or make my driver based on it and then use it for reading/writing.
>
> I understand character device drivers but, i am at a loss when it comes to understand these platform drivers. I come from embedded domain and these drivers seem are ubiquitous.
>
> Thanks.
>> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies