[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Activate a Real Time Clock chip on I2C in Raspberry Pi 4B with Debian (not Raspbian)



I searched for other ways but this was the only way to do it from userspace without device tree changes ... The online device tree overlays don't work without kernel support and a DT that got compiled with the "-@" option. That is not the case with stock Debian kernels. In my opinion, dtcs are nowadays more like firmware as they change more or less often between kernel versions. In the original meaning they were thought to stay the same even among different os like Linux and FreeBSD.

Bye

Georg

18.04.2023 01:59:14 Paul Wise <pabs@debian.org>:

> On Sun, 2023-04-16 at 11:17 +0200, Georg Gast wrote:
> 
>> ExecStart=/bin/sh -c "modprobe i2c_bcm2835 && modprobe i2c_bcm2708 &&
>> modprobe rtc_ds1307 && sleep 1 && echo ds1307 0x68 >
>> /sys/class/i2c-adapter/i2c-1/new_device && /sbin/hwclock -s"
> 
> I feel like there should be a better way to do this than manually doing
> /sys changes? Is there no i2c command for wrapping /sys i2c changes?
> 
> -- 
> bye,
> pabs
> 
> https://wiki.debian.org/PaulWise


Reply to: