• [SOLVED} Re: Activate a Real Time Clock chip on I2C in Raspberry Pi 4B

    From Rick Thomas@21:1/5 to Rick Thomas on Fri May 12 11:00:01 2023
    Turns out that the PiHut has a tutorial webpage for just this problem!

    https://thepihut.com/blogs/raspberry-pi-tutorials/17209332-adding-a-real-time-clock-to-your-raspberry-pi

    Thanks for all the help!
    Rick

    On Tue, Apr 18, 2023, at 11:06 PM, Rick Thomas wrote:
    Thanks very much, Pabs! I will follow up on those links and hopefully
    get a better understanding of what is going on and why. Perhaps the
    next time someone has a question like mine, I'll be able to be as
    helpful to them as the folks here have been to me!

    Rick

    On Tue, Apr 18, 2023, at 4:57 PM, Paul Wise wrote:
    On Mon, 2023-04-17 at 22:21 -0700, Rick Thomas wrote:

    What would have been even greater is if the error messages include
    references to some documentation that explained the problem and gave
    some clues to the larger context in which the problem arose.

    The messages I sent that patch adding are for very simple issues;
    "/proc not mounted", "/sys not mounted" and "i2c-dev not loaded" and
    since they all have very simple solutions, I just added the commands
    to fix them instead of pointers to documentation about each error.

    Probably the i2c manual pages should get some links to the Linux kernel
    documentation and wiki for I2C. I'm unlikely to work on that though,
    hopefully someone else is willing to do that.

    For example, I'd like to know why it chose bus3 rather than one of
    the other busses (0,1,2,4)?

    I expect that depends on the bus driver code for your device,
    those do not seem to document their ordering though and it
    looks like your particular i2c bus driver has no documentation.

    https://www.kernel.org/doc/html/latest/i2c/busses/index.html

    I'd also like to know what the various modules do and what kinds of
    parameters there are to influence the detailed behavior?

    Looks like the devices are defined by DeviceTree, ACPI, board files,
    dynamically by drivers for other devices, hardware probing or sysfs:

    https://www.kernel.org/doc/html/latest/i2c/instantiating-devices.html

    And where is the documentation for the magic writing into /sys ?

    Seems to be here:

    https://www.kernel.org/doc/html/latest/i2c/instantiating-devices.html#method-4-instantiate-from-user-space
    https://www.kernel.org/doc/html/latest/i2c/i2c-sysfs.html

    These may also be useful:

    https://www.kernel.org/doc/html/latest/i2c/
    https://archive.kernel.org/oldwiki/i2c.wiki.kernel.org/

    PS: I am subscribed, no need to CC me, please respect Reply-To.

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    Attachments:
    * signature.asc

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)