Search results

  1. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Yeah, that makes a lot of sense. Time to dust off the old getopts() man page :D
  2. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Nice! I'm working on improving the tool with support for a config file and sensible defaults for the pyra, and maybe some better cleanup on module unload so it resets the events. Unfortunately, my volume wheel came off so I'll have to resolder it to test. Hopefully, the PCB pad didn't come off...
  3. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    I think that should be ./pyra_vol_monitor 2 echo for the Pyra. I've forked the Linux repo on GitHub and pushed my working branch: https://github.com/Risca/linux/tree/palmas_gpadc The very last commit is only meant for my devboard though, since it changes the IN1 channel from temp sensor to...
  4. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Ah, I see. I'll stop squashing my patches :oops: I just didn't feel right with providing a patch that introduced a bug
  5. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    I'm based on git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git, tag 08.04.00.004 (Linux-5.10.120). You mean the patches don't apply clean on letux-6.1-rc2? Sure!
  6. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Small update today. Fixed the bug where reading the threshold value would give you a different value as when you write the threshold :) Kernel patches attached
  7. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Finally some updates! I got a simple monitor userspace program working now, and it works "okay" :) I still see some bugs from the kernel driver (I think!), and the program is quite limited. The kernel driver occasionally gets stuck and cannot change threshold values. I haven't figured out yet...
  8. Risca

    Release Otto Matic

    The history log sure fooled me into believing this was the Pandora release ;)
  9. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    I'm off to Oktoberfest this week, so I'll not have time to work on this in the near future. Maybe I'll see any of you there? I'll be wearing lederhosen! :D
  10. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    I run a custom OS based on Buildroot and it doesn't autoload the palmas_gpadc.ko. I usually overwrite the existing module and then do rmmod + insmod. What does lsmod show? Who is using the palmas_gpadc module? Oh, now I remember! The original kernel module has a bug in palmas_gpadc_remove() so...
  11. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Okay, finally got some time to work on this (on a train!) and I think I got the driver code fairly stable now. I managed to rip off the solder pad for R82, so I had to start using GPADC_IN1 which is routed to R80 right next to R82. I'll fix up the code in proper git, email friendly patches...
  12. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Okay, got most of the boilerplate code done to set high and low threshold values from userspace and integrate with the IIO Event subsystem. In theory, this should be enough to create a userspace application that will get woken up only when the "volume" (ADC value) changes. The TWL6037 will...
  13. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Eureka! I can get interrupts from TWL6037 on both high and low threshold! No more polling needed :) # insmod /lib/modules/5.10.120/kernel/drivers/iio/adc/palmas_gpadc.ko [ 1585.028884] palmas-gpadc 48070000.i2c:palmas@48:gpadc: palmas_adc_wakeup_configure # [ 1592.146455] palmas-gpadc...
  14. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Rate my volume wheel :D
  15. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    0Ω, you say? We'll see about that! *starts looking for my soldering iron*
  16. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Okay, so this was easier to test than I first anticipated :D I wasn't able to test the thresholds, but I can confirm that it's possible to program both "slots" with the same channel! I noticed that channel 7 on my devboard was changing values up and down a bit so I setup TWL6037 to continuously...
  17. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    So, after some datasheet reading and pondering, I have an idea! The datasheets that I've read for various "palmas" type devices (i.e. TWL6037) says that when the device is in "AUTO" mode then 1 or 2 channels can be periodically sampled. For each channel being sampled, a threshold can be set and...
  18. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    Another common technique is to define the whole peripheral register space as a struct and then cast the base address of the peripheral to this struct. In my case it would look something like this: struct __attribute__((__packed__)) GPIO { UInt8 padding1[0x13C]; UInt32 DATAOUT; UInt8...
  19. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    First of all, my defines doesn't use the values written in the datasheet. That's a source of confusion. Sure, I left a comment in there, but that comment fail to explain how that address mapping happened. The address mapping (or offset) is part of my firmware. Linux will read my firmware and...
  20. Risca

    Couldn't wait for my Pyra, so I bought a OMAP5432 devboard

    I took a quick look at the Linux I2C driver and it shouldn't be that hard to implement a simple driver in the M4. We fortunately doesn't have to cover all the little corner cases that the Linux driver has to, and we can focus on the polling path and ignore interrupts. I'm busy this weekend, so...
Back
Top