All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Joel Stanley" <joel@jms.id.au>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH v2 5/6] misc: add pca9552 LED blinker model
Date: Sat, 7 Oct 2017 18:41:42 +0200	[thread overview]
Message-ID: <2a6d818e-4306-1189-cddb-79cc2eea8499@kaod.org> (raw)
In-Reply-To: <CAFEAcA-AnBaHadyHaOuS4648b3W3AXngMs9k9hCCDXyXBSLvTg@mail.gmail.com>

On 10/06/2017 05:12 PM, Peter Maydell wrote:
> On 20 September 2017 at 08:01, Cédric Le Goater <clg@kaod.org> wrote:
>> Specs are available here :
>>
>>   https://www.nxp.com/docs/en/data-sheet/PCA9552.pdf
>>
>> This is a simple model supporting the basic registers for led and GPIO
>> mode. The device also supports two blinking rates but not the model
>> yet.
>>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> 
> 
>> --- /dev/null
>> +++ b/include/hw/misc/pca9552.h
>> @@ -0,0 +1,32 @@
>> +/*
>> + * PCA9552 I2C LED blinker
>> + *
>> + * Copyright (c) 2017, IBM Corporation.
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2 or
>> + * later. See the COPYING file in the top-level directory.
>> + */
>> +#ifndef PCA9552_H
>> +#define PCA9552_H
>> +
>> +#include "hw/i2c/i2c.h"
>> +
>> +#define TYPE_PCA9552 "pca9552"
>> +#define PCA9552(obj) OBJECT_CHECK(PCA9552State, (obj), TYPE_PCA9552)
>> +
>> +
>> +#define PCA9552_NR_REGS 10
>> +
>> +typedef struct PCA9552State {
>> +    /*< private >*/
>> +    I2CSlave i2c;
>> +    /*< public >*/
>> +
>> +    uint8_t len;
>> +    uint8_t pointer;
>> +    uint8_t buf[1]; /* just to remember how to handle a larger buffer */
> 
> Changing this later is going to be a migration compatibility break
> (or at least a bit painful to keep compat).
> Do we know how big the buffer is supposed to be? 

one. 

> If so it would be best to make it the correct size to start with.

yes I will change that.

Thanks,

C.

> 
>> +
>> +    uint8_t regs[PCA9552_NR_REGS];
>> +} PCA9552State;
> 
> thanks
> -- PMM
> 

  reply	other threads:[~2017-10-07 16:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  7:01 [Qemu-devel] [PATCH v2 0/6] aspeed: add a witherspoon-bmc machine Cédric Le Goater
2017-09-20  7:01 ` [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board Cédric Le Goater
2017-10-06 15:10   ` Peter Maydell
2017-10-07 16:42     ` Cédric Le Goater
2017-10-10  9:19     ` Cédric Le Goater
2017-10-10  9:54       ` Peter Maydell
2017-10-10 13:21         ` Cédric Le Goater
2017-10-10 13:24           ` Peter Maydell
2017-10-10 15:38             ` Cédric Le Goater
2017-10-10 15:45               ` Peter Maydell
2017-10-10 15:54                 ` Cédric Le Goater
2017-10-09  0:04   ` Andrew Jeffery
2017-10-10 13:30     ` Cédric Le Goater
2017-10-10 13:32       ` Peter Maydell
2017-10-11  3:49       ` Andrew Jeffery
2017-10-11  7:28         ` Cédric Le Goater
2017-10-16  1:55           ` Andrew Jeffery
2017-09-20  7:01 ` [Qemu-devel] [PATCH v2 2/6] aspeed: add an I2C RTC device to all machines Cédric Le Goater
2017-10-09  0:28   ` Andrew Jeffery
2017-09-20  7:01 ` [Qemu-devel] [PATCH v2 3/6] smbus: add a smbus_eeprom_init_one() routine Cédric Le Goater
2017-10-08 21:35   ` Philippe Mathieu-Daudé
2017-09-20  7:01 ` [Qemu-devel] [PATCH v2 4/6] aspeed: Add EEPROM I2C devices Cédric Le Goater
2017-10-09  0:45   ` Andrew Jeffery
2017-09-20  7:01 ` [Qemu-devel] [PATCH v2 5/6] misc: add pca9552 LED blinker model Cédric Le Goater
2017-10-06 15:12   ` Peter Maydell
2017-10-07 16:41     ` Cédric Le Goater [this message]
2017-09-20  7:01 ` [Qemu-devel] [PATCH v2 6/6] aspeed: add the pc9552 chips to the witherspoon machine Cédric Le Goater
2017-10-09  0:47   ` Andrew Jeffery
2017-10-06 15:13 ` [Qemu-devel] [PATCH v2 0/6] aspeed: add a witherspoon-bmc machine Peter Maydell
2017-10-07 16:44   ` Cédric Le Goater

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=2a6d818e-4306-1189-cddb-79cc2eea8499@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@aj.id.au \
    --cc=f4bug@amsat.org \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.