Camera Flash

Say Cheese!... Almost

6 Mar 2026

It’s been a while. Unfortunately, lost a bit of motivation due to world events. Absolutely hate the death and destruction going on in the world, but anyways this blog post is not about that.

I’ve got a lot of things working so far, but today I’m going to focus on the camera flash, as that’s the only patch series I really had motivation to upstream. As always, here is the patch series.

I haven’t put out a pull request to merge the configs to pmaports. I think moving forward, I will only add configs to devices.config once the patches have merged upstream as the vibrator patch series is still not merged. I’m debating doing the same with the blog posts, but I think it might be better to put ammendments at the end. Currently noted down how to get camera flash working with mainline Linux on the postmarketOS device wiki page.

Overall, pretty happy with the changes made by the AI. Originally, Claude created a separate driver, but I made it look for a PWM GPIO LED. Seems like that didn’t exist, but a similar device driver did exist, so it made modifications to that. Original driver has something called enable_torch which was required, but I made enable_torch xor unlock_gpio (unlock_gpio is something I introduced) required. Curious why Claude pushed back on making it an xor. It basically said that we should make these both optional just in case there are other peripherals that need them as optional, but then why wouldn’t those who need that functionality just submit a patch for that. After those main two feedback loops, I pushed it to lkml. I think this patch series should have little to no push back. And I get camera flash working just by doing: doas sh -c “echo 1 > /sys/class/leds/white:flash/flash_strobe”! Nice :)

AI Assistance

You might’ve noticed that I said that I got multiple features working. So far what I’ve verified that is working is Wifi & Bluetooth (based on Smank’s patches. I need to clean up the hack required), camera flash, partial display support, and battery fuelgauge. All in one night.

One night?! How?! I basically told Claude 4.6 to look at downstream (where this tree keeps only required files for the device) and port everything to mainline. All while I can focus on other things in life. I basically let it do it’s thing overnight, kinda like how it was described in Claude’s C Compiler blog.

Once it was done, I merged all the commits it made into one commit. The mess that Claude made is here, though this link might break once I rebase. The speed up is quite insane, but verifying this actually works will still be tedious.

This is how I actually got the camera flash working. Once it was working, I asked Claude to pull out the relevant bits for the patch series and iterated on that.

I think once I get Wifi mainlined, I will ask Claude to iterate on the cameras overnight and see if it can figure it out. Basically I will let it SSH in, load the module(s) and dt overlays and test the camera drivers. I’m curious if it will work. Getting display and audio working will be much harder as I will basically need to verify for the AI what is happening, whereas the camera driver can be iterated overnight. I’m curious what will happen.

Oh yeah, almost forgot. I’ve created 2 new projects with AI’s help: QuickDirtyBoot and WCNSS_Binary_Maker. Reasoning for both:

Upstream Slowdown

I still have yet to properly upstream the PPP connectivity patches and the expressatt vibrator patches. They both need a bit of tuning (PPP requires a slight rework and expressatt vibrator needs to identify why vibrator isn’t variable. Seems like the vibrator issue is something unrelated to my changes). I will probably jump betweening mainlining those two patch series and also cleaning up the AI generated commits to see what else is working. Otherwise having multiple pending upstream patch series will just be confusing for me.

I don’t blog much about other mainlining work (regarding pmaports development, Pinephone Pro, or Surface RT) and generally keep that as short Mastodon posts. But yeah! Expressatt isn’t the only thing I work on!

What’s Working

What’s Left

This list will potentially grow later as I find more things