linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Staudt <max@enpas.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Linux/m68k <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [PATCH] i2c/busses: Add i2c-icy for I2C on m68k/Amiga
Date: Mon, 12 Aug 2019 12:43:34 +0200	[thread overview]
Message-ID: <fe5cf25f-1804-dc45-7010-01e602b3f3e5@enpas.org> (raw)
In-Reply-To: <CAMuHMdVJJxjH-gPraW==smrkOOMcGYPKB8BPzrYPU4bstASX3A@mail.gmail.com>

Hi Geert,

Thanks for your feedback!
Replies below.

On 08/12/2019 11:37 AM, Geert Uytterhoeven wrote:
> What about the RTC? The schematics show both a ds1620 and pcf8583.

Oh no! I missed those in the original project, in my mind it didn't have any extra hardware at all.

I only own the new board with the LTC2990, and I'm pretty sure there are more of these in circulation than the original board. So if it's okay, I'll skip the DS1620 and PCF8583.


>> +static void icy_pcf_setbyte(void *data, int ctl, int val)
> 
> icy_pcf_setpcf(), to match the callback name?

Fair. I kept the name when I cloned i2c-elektor.c.


> zorro_request_device()?
> Ah, there's no devm_*() variant yet. OK.

Also, I only wanted to reserve the first 4 bytes. Thinking about it now, it makes more sense to reserve the whole AutoConfig'd space, as I don't know whether the bus GAL maps the PCF8584 across the whole 64k repeatedly.


>> +       /*
>> +        * The 2019 a1k.org PCBs have an LTC2990 at 0x4c, so start
>> +        * it automatically once ltc2990 is modprobed.
>> +        *
>> +        * in0 is the voltage of the internal 5V power supply.
>> +        * temp1 is the temperature inside the chip.
>> +        *
>> +        * Configuration 0x18 enables all sensors on this PCB:
>> +        *  # modprobe i2c-dev
>> +        *  # i2cset 0 0x4c 1 0x18
> 
> What's the reason for the i2cset command?

It sets the sensor modes in the LTC2990 and enables the three sensors listed below. I should have clarified this.

I tried to integrate this in the driver, but ltc2990 only allows reading this configuration out of a device tree. Is there a good way to fake a DT entry in the init function?


> 
>> +        *  # modprobe ltc2990
>> +        * in1 will be the voltage of the 5V rail, divided by 2.
>> +        * in2 will be the voltage of the 12V rail, divided by 4.
>> +        * temp3 will be measured using a PCB loop next the chip.
>> +        */
>> +       i2c->client_ltc2990 = i2c_new_probed_device(&i2c->adapter,
>> +                                                   &icy_ltc2990_info,
>> +                                                   icy_ltc2990_addresses,
>> +                                                   NULL);
>> +
>> +       return 0;
>> +}


Thanks for your feedback,
Max

  reply	other threads:[~2019-08-12 10:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-11  4:32 [PATCH] i2c/busses: Add i2c-icy for I2C on m68k/Amiga Max Staudt
2019-08-11  4:40 ` Max Staudt
2019-08-12  9:37 ` Geert Uytterhoeven
2019-08-12 10:43   ` Max Staudt [this message]
2019-08-12 11:07     ` Geert Uytterhoeven
2019-08-12 11:48       ` Max Staudt
2019-08-12 22:21   ` Max Staudt
2019-08-13  6:53     ` Geert Uytterhoeven
2019-08-20  9:23 [PATCH v5 1/3] " Max
2019-08-20  9:27 ` [PATCH] " Max Staudt
2019-08-29 19:00   ` Wolfram Sang
2019-08-29 19:17     ` Max Staudt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe5cf25f-1804-dc45-7010-01e602b3f3e5@enpas.org \
    --to=max@enpas.org \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).