Re: [PATCH linux] drivers/fsi: Add SBEFIFO FSI client device driver

2017-06-20 Thread Eddie James
On 06/15/2017 5:24 AM, gre...@linuxfoundation.org wrote: On Wed, Jun 14, 2017 at 02:47:27PM -0500, Edward A. James wrote: +struct sbefifo { +struct timer_list poll_timer; +struct fsi_device *fsi_dev; +struct miscdev

[PATCH linux 0/4] drivers/fsi: Add SBEFIFO and OCC drivers

2017-06-21 Thread Eddie James
From: "Edward A. James" This series adds two FSI-based device drivers. The OCC driver is dependent on the SBEFIFO driver, as a user of it's in-kernel API. The in-kernel API provided by the OCC driver will be used by a hwmon driver (to be sent to the lkml soon). I previously sent up the first pat

[PATCH linux 4/4] drivers/fsi/occ: Add in-kernel API

2017-06-21 Thread Eddie James
From: "Edward A. James" Add an in-kernel read/write API with exported functions. This is necessary for other drivers which want to directly interact with the OCC. Also parse the OCC device tree node for child nodes and create child platform devices accordingly. Signed-off-by: Edward A. James --

[PATCH linux 1/4] drivers/fsi: Add SBEFIFO FSI client device driver

2017-06-21 Thread Eddie James
(sbefifo); + + spin_lock(&sbefifo->lock); + list_for_each_entry(xfr, &sbefifo->xfrs, xfrs) + kfree(xfr); + spin_unlock(&sbefifo->lock); + + WRITE_ONCE(sbefifo->rc, -ENODEV); + + wake_up(&sbefifo->wait); + sbefifo_put(sbefifo); + } + + return 0; +} + +static struct fsi_device_id sbefifo_ids[] = { + { + .engine_type = FSI_ENGID_SBE, + .version = FSI_VERSION_ANY, + }, + { 0 } +}; + +static struct fsi_driver sbefifo_drv = { + .id_table = sbefifo_ids, + .drv = { + .name = DEVICE_NAME, + .bus = &fsi_bus_type, + .probe = sbefifo_probe, + .remove = sbefifo_remove, + } +}; + +static int sbefifo_init(void) +{ + INIT_LIST_HEAD(&sbefifo_fifos); + return fsi_driver_register(&sbefifo_drv); +} + +static void sbefifo_exit(void) +{ + fsi_driver_unregister(&sbefifo_drv); + + ida_destroy(&sbefifo_ida); +} + +module_init(sbefifo_init); +module_exit(sbefifo_exit); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Brad Bishop "); +MODULE_AUTHOR("Eddie James "); +MODULE_DESCRIPTION("Linux device interface to the POWER self boot engine"); -- 1.8.3.1

[PATCH linux 3/4] drivers/fsi: Add On-Chip Controller (OCC) driver

2017-06-21 Thread Eddie James
occ_remove(struct platform_device *pdev) +{ + struct occ *occ = platform_get_drvdata(pdev); + + flush_work(&occ->work); + misc_deregister(&occ->mdev); + ida_simple_remove(&occ_ida, occ->idx); + + return 0; +} + +static const struct of_device_id occ_match[] = { + { .compatible = "ibm,p9-occ" }, + { }, +}; + +static struct platform_driver occ_driver = { + .driver = { + .name = "occ", + .of_match_table = occ_match, + }, + .probe = occ_probe, + .remove = occ_remove, +}; + +static int occ_init(void) +{ + occ_wq = create_singlethread_workqueue("occ"); + if (!occ_wq) + return -ENOMEM; + + return platform_driver_register(&occ_driver); +} + +static void occ_exit(void) +{ + destroy_workqueue(occ_wq); + + platform_driver_unregister(&occ_driver); + + ida_destroy(&occ_ida); +} + +module_init(occ_init); +module_exit(occ_exit); + +MODULE_AUTHOR("Eddie James "); +MODULE_DESCRIPTION("BMC P9 OCC driver"); +MODULE_LICENSE("GPL"); -- 1.8.3.1

[PATCH linux 2/4] drivers/fsi/sbefifo: Add in-kernel API

2017-06-21 Thread Eddie James
From: "Edward A. James" Refactor the user interface of the SBEFIFO driver to allow for an in-kernel read/write API. Add exported functions for other drivers to call, and add an include file with those functions. Also parse the device tree for child nodes and create child platform devices accordin

[prefix=PATCH] drivers: pmbus: core: Prevent calling pmbus_set_page with negative page

2017-10-25 Thread Eddie James
From: "Edward A. James" For devices with word data registers, the pmbus core may call read/write word data functions with a page value of -1, in order to perform the operation without setting the page. However, the read/write word data functions accept only unsigned 8-bit page numbers, resulting

Re: drivers (pmbus): ir35221: Set PMBUS_PAGE before reading id and model

2017-10-25 Thread Eddie James
On 10/23/2017 05:12 PM, Guenter Roeck wrote: On Mon, Oct 23, 2017 at 10:23:02AM -0500, Eddie James wrote: On 10/21/2017 11:10 AM, Guenter Roeck wrote: On Thu, Oct 19, 2017 at 03:57:08PM -0500, eaja...@linux.vnet.ibm.com wrote: From: "Edward A. James" The MFR_ID and MFR_MODEL,

Re: [prefix=PATCH] drivers: pmbus: core: Prevent calling pmbus_set_page with negative page

2017-10-25 Thread Eddie James
On 10/25/2017 04:12 PM, Guenter Roeck wrote: On Wed, Oct 25, 2017 at 02:52:53PM -0500, Eddie James wrote: From: "Edward A. James" For devices with word data registers, the pmbus core may call read/write word data functions with a page value of -1, in order to perform the operati

[PATCH] drivers (pmbus): ir35221: Set PMBUS_PAGE before reading id and model

2017-10-19 Thread Eddie James
From: "Edward A. James" The MFR_ID and MFR_MODEL, which are manually read before probing the pmbus core, are only valid for the two pages that the ir35221 has available. Since we don't know the state of the device when we start probing, set the page number first before reading id and model. Sig

[PATCH v2] hwmon: (pmbus/core): Prevent unintentional setting of page to 0xFF

2017-10-27 Thread Eddie James
From: "Edward A. James" The pmbus core may call read/write word data functions with a page value of -1, intending to perform the operation without setting the page. However, the read/write word data functions accept only unsigned 8-bit page numbers, and therefore cannot check for negative page nu

[PATCH v4 4/9] hwmon: Add On-Chip Controller (OCC) hwmon driver

2018-07-11 Thread Eddie James
structure of the OCC hwmon driver. There are two platform drivers, one each for P8 and P9 OCCs. These are probed through the I2C tree and the FSI-based OCC driver, respectively. The patch also defines the first common structures and methods between the two OCC versions. Signed-off-by: Eddie James

Re: [PATCH] hwmon (pmbus): cffps: Add led class device for power supply fault led

2018-01-10 Thread Eddie James
On 01/09/2018 04:50 PM, Guenter Roeck wrote: On Tue, Jan 09, 2018 at 04:05:24PM -0600, Eddie James wrote: This power supply device doesn't correctly manage it's own fault led. Add an led class device and register it so that userspace can manage power supply fault led as necessary.

[PATCH v2] hwmon (pmbus): cffps: Add led class device for power supply fault led

2018-01-10 Thread Eddie James
This power supply device doesn't correctly manage it's own fault led. Add an led class device and register it so that userspace can manage power supply fault led as necessary. Signed-off-by: Eddie James --- Changes since v1: - move led registration into a separate function.

Re: [PATCH v2] hwmon (pmbus): cffps: Add led class device for power supply fault led

2018-01-11 Thread Eddie James
On 01/10/2018 12:16 PM, Guenter Roeck wrote: On Wed, Jan 10, 2018 at 11:29:43AM -0600, Eddie James wrote: This power supply device doesn't correctly manage it's own fault led. Add an led class device and register it so that userspace can manage power supply fault led as necessary.

[PATCH v3] hwmon (pmbus): cffps: Add led class device for power supply fault led

2018-01-11 Thread Eddie James
This power supply device doesn't correctly manage it's own fault led. Add an led class device and register it so that userspace can manage power supply fault led as necessary. Signed-off-by: Eddie James --- Changes since v2: - Use fixed size buffer for led name. Changes since v

[PATCH] hwmon (pmbus): cffps: Add PMBUS_SKIP_STATUS_CHECK

2018-01-08 Thread Eddie James
: Eddie James --- drivers/hwmon/pmbus/ibm-cffps.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c index de254747..2d6f4f4 100644 --- a/drivers/hwmon/pmbus/ibm-cffps.c +++ b/drivers/hwmon/pmbus/ibm-cffps.c @@ -15,6 +15,7

[PATCH] hwmon (pmbus): cffps: Add led class device for power supply fault led

2018-01-09 Thread Eddie James
This power supply device doesn't correctly manage it's own fault led. Add an led class device and register it so that userspace can manage power supply fault led as necessary. Signed-off-by: Eddie James --- drivers/hwmon/pmbus/ibm-cffps.c | 90 +--

Re: [PATCH] hwmon: pmbus: ibm-cffps depends on LEDS_CLASS

2018-01-15 Thread Eddie James
On Fri, Jan 12, 2018 at 06:19:00PM +0100, Guenter Roeck wrote: On Fri, Jan 12, 2018 at 04:49:00PM +0100, Arnd Bergmann wrote: > Building without CONFIG_LEDS_CLASS causes a link failure: > > drivers/hwmon/pmbus/ibm-cffps.o: In function `ibm_cffps_probe': > ibm-cffps.c:(.text+0x4f4): undefined ref

[PATCH 0/2] hwmon: (ucd9000) Add gpio and debugfs interfaces

2018-03-09 Thread Eddie James
The ucd9000 series chips have gpio pins. Add a gpio chip interface to the ucd device so that users can query and set the state of the gpio pins. Add a debugfs interface using the existing pmbus debugfs directory to provide MFR_STATUS and the status of the gpi faults to users. Christopher Bostic (

[PATCH 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-09 Thread Eddie James
Signed-off-by: Eddie James --- drivers/hwmon/pmbus/ucd9000.c | 172 +- 1 file changed, 171 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c index e3a507f..297da0e 100644 --- a/drivers/hwmon/pmbus/ucd9000.c

[PATCH 1/2] hwmon: (ucd9000) Add gpio chip interface

2018-03-09 Thread Eddie James
From: Christopher Bostic Add a struct gpio_chip and define some methods so that this device's I/O can be accessed via /sys/class/gpio. Signed-off-by: Christopher Bostic Signed-off-by: Andrew Jeffery Signed-off-by: Eddie James --- drivers/hwmon/pmbus/ucd9000.c

[PATCH 0/2] aspeed: watchdog: fix system reset and read alt-boot option

2018-03-09 Thread Eddie James
This series provides a fix to correctly set the reset mode of the control register. Previously, configuring anything other than a full chip reset would not reset anything when the watchdog timer expires. The series also provides a patch to read in the existing aspeed,alt-boot boolean option from th

[PATCH 1/2] watchdog: aspeed: Fix translation of reset mode to ctrl register

2018-03-09 Thread Eddie James
er Signed-off-by: Eddie James --- drivers/watchdog/aspeed_wdt.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index ca5b91e..d1987d6 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/as

[PATCH 2/2] watchdog: aspeed: Allow configuring for alternate boot

2018-03-09 Thread Eddie James
goes to flash bank 1, while on the ast2500 the chip selects are swapped. Signed-off-by: Milton Miller Signed-off-by: Eddie James --- drivers/watchdog/aspeed_wdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index d1987d6

[PATCH] clk: aspeed: Prevent reset if clock is enabled

2018-03-07 Thread Eddie James
et while enabled. Therefore, check whether the clock is enabled or not before performing the reset and enable sequence in the Aspeed clock driver. Signed-off-by: Eddie James --- drivers/clk/clk-aspeed.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/clk-aspeed.c b/drivers

[PATCH] aspeed: watchdog: Add status function

2018-03-26 Thread Eddie James
Populate the status watchdog operation to return the "timeout status" register of the ASPEED watchdog. Signed-off-by: Eddie James --- drivers/watchdog/aspeed_wdt.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_w

Re: [PATCH] aspeed: watchdog: Add status function

2018-03-26 Thread Eddie James
On 03/26/2018 05:00 PM, Guenter Roeck wrote: On 03/26/2018 02:17 PM, Eddie James wrote: Populate the status watchdog operation to return the "timeout status" register of the ASPEED watchdog. Signed-off-by: Eddie James ---   drivers/watchdog/aspeed_wdt.c | 9 +   1 file

[PATCH v2 1/2] clk: aspeed: Fix is_enabled for certain clocks

2018-03-08 Thread Eddie James
function. Use the existing gate flag to correctly return whether or not a clock is enabled in the aspeed_clk_is_enabled function. Signed-off-by: Eddie James --- drivers/clk/clk-aspeed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk

[PATCH v2 2/2] clk: aspeed: Prevent reset if clock is enabled

2018-03-08 Thread Eddie James
et while enabled. Therefore, check whether the clock is enabled or not before performing the reset and enable sequence in the Aspeed clock driver. Root-caused-by: Lei Yu Signed-off-by: Eddie James --- drivers/clk/clk-aspeed.c | 29 + 1 file changed, 17 insertions(+), 12 d

[PATCH v2 0/2] clk: aspeed: Fix is_enabled and prevent reset if clock enabled

2018-03-08 Thread Eddie James
is by default. Thanks to Lei Yu for tracking down the LPC issue. Changes since v1: - Fix is_enabled. - Check for enabled in the spinlock in the enable function. - Use is_enabled instead of more code to read the register. Eddie James (2): clk: aspeed: Fix is_enabled for certain clocks clk

Re: [PATCH 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-13 Thread Eddie James
On 03/10/2018 10:50 AM, Guenter Roeck wrote: On 03/09/2018 11:19 AM, Eddie James wrote: From: Christopher Bostic Expose the gpiN_fault fields of mfr_status as individual debugfs attributes. This provides a way for users to be easily notified of gpi faults. Also provide the whole mfr_status

Re: [PATCH 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-13 Thread Eddie James
On 03/13/2018 02:29 PM, Guenter Roeck wrote: On Tue, Mar 13, 2018 at 02:01:51PM -0500, Eddie James wrote: On 03/10/2018 10:50 AM, Guenter Roeck wrote: On 03/09/2018 11:19 AM, Eddie James wrote: From: Christopher Bostic Expose the gpiN_fault fields of mfr_status as individual debugfs

[PATCH v2 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-13 Thread Eddie James
Signed-off-by: Eddie James --- drivers/hwmon/pmbus/ucd9000.c | 140 +- 1 file changed, 139 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c index 023fb9e..b073d8e 100644 --- a/drivers/hwmon/pmbus/ucd9000.c

[PATCH v2 0/2] hwmon: (ucd9000) Add gpio and debugfs interfaces

2018-03-13 Thread Eddie James
The ucd9000 series chips have gpio pins. Add a gpio chip interface to the ucd device so that users can query and set the state of the gpio pins. Add a debugfs interface using the existing pmbus debugfs directory to provide MFR_STATUS and the status of the gpi faults to users. Changes since v1: -

[PATCH v2 1/2] hwmon: (ucd9000) Add gpio chip interface

2018-03-13 Thread Eddie James
From: Christopher Bostic Add a struct gpio_chip and define some methods so that this device's I/O can be accessed via /sys/class/gpio. Signed-off-by: Christopher Bostic Signed-off-by: Andrew Jeffery Signed-off-by: Eddie James --- drivers/hwmon/pmbus/ucd9000.c

Re: [PATCH] fsi: occ: fix a NULL vs IS_ERR() check

2018-11-26 Thread Eddie James
On 11/26/2018 02:11 AM, Dan Carpenter wrote: The platform_device_register_full() function doesn't return NULL, it returns error pointers. Fixes: 4e01f5644463 ("fsi: Add On-Chip Controller (OCC) driver") Signed-off-by: Dan Carpenter Thanks. Reviewed-by: Eddie James --

Re: [PATCH v5 0/2] media: platform: Add Aspeed Video Engine Driver

2018-11-27 Thread Eddie James
On 11/15/2018 03:20 AM, Hans Verkuil wrote: On 11/12/2018 10:00 PM, Eddie James wrote: From: Eddie James The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs can capture and compress video data from digital or analog sources. With the Aspeed chip acting as a service

Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation

2018-07-10 Thread Eddie James
On 07/09/2018 05:41 PM, Wolfram Sang wrote: + cmd |= FIELD_PREP(I2C_CMD_ADDR, msg->addr >> 1); I just noticed this and wonder: Don't you need the LSB of the address? It is not the RW flag, this is encoded in msg->flags. So, the hardware interprets the LSB as the RW flag. It wouldn't b

Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation

2018-07-10 Thread Eddie James
On 07/10/2018 01:50 PM, Wolfram Sang wrote: + cmd |= FIELD_PREP(I2C_CMD_ADDR, msg->addr >> 1); I just noticed this and wonder: Don't you need the LSB of the address? It is not the RW flag, this is encoded in msg->flags. So, the hardware interprets the LSB as the RW flag. It wouldn't be

Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation

2018-07-10 Thread Eddie James
On 07/10/2018 02:39 PM, Wolfram Sang wrote: Sorry, what do you mean "show up as"? Yes, we could first shift all our addresses in user-space before passing them to the driver, so that the msg->addr field is exactly what the hardware expects already... This would be non-trivial for our users con

Re: [PATCH v10 5/7] i2c: fsi: Add transfer implementation

2018-06-27 Thread Eddie James
On 06/25/2018 09:38 PM, Wolfram Sang wrote: On Wed, Jun 13, 2018 at 02:36:17PM -0500, Eddie James wrote: Execute I2C transfers from the FSI-attached I2C master. Use polling instead of interrupts as we have no hardware IRQ over FSI. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c

Re: [PATCH v10 7/7] i2c: fsi: Add bus recovery

2018-06-27 Thread Eddie James
On 06/25/2018 09:38 PM, Wolfram Sang wrote: On Wed, Jun 13, 2018 at 02:36:19PM -0500, Eddie James wrote: Bus recovery should reset the engine and force clock the bus 9 times to recover most situations. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 19

Re: [PATCH v10 4/7] i2c: fsi: Add abort and hardware reset procedures

2018-06-27 Thread Eddie James
On 06/25/2018 09:38 PM, Wolfram Sang wrote: On Wed, Jun 13, 2018 at 02:36:16PM -0500, Eddie James wrote: Add abort procedure for failed transfers. Add engine and bus reset procedures to recover from as many faults as possible. I think this is a way too aggressive recovery. Your are doing

Re: [PATCH v10 0/7] i2c: Add FSI-attached I2C master algorithm

2018-06-27 Thread Eddie James
On 06/25/2018 09:39 PM, Wolfram Sang wrote: On Wed, Jun 13, 2018 at 02:36:12PM -0500, Eddie James wrote: This series adds an algorithm for an I2C master physically located on an FSI slave device. The I2C master has multiple ports, each of which may be connected to an I2C slave. Access to the

Re: [PATCH v7 2/7] drivers/i2c: Add FSI-attached I2C master algorithm

2018-05-30 Thread Eddie James
On 05/29/2018 06:42 PM, Andy Shevchenko wrote: On Wed, May 30, 2018 at 1:24 AM, Eddie James wrote: From: "Edward A. James" Add register definitions for FSI-attached I2C master and functions to access those registers over FSI. Add an FSI driver so that our I2C bus is probed up

Re: [PATCH v7 3/7] drivers/i2c: Add port structure to FSI algorithm

2018-05-30 Thread Eddie James
On 05/29/2018 06:19 PM, Andy Shevchenko wrote: On Wed, May 30, 2018 at 1:24 AM, Eddie James wrote: From: "Edward A. James" Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. +#include +

Re: [PATCH v7 3/7] drivers/i2c: Add port structure to FSI algorithm

2018-05-30 Thread Eddie James
On 05/29/2018 06:19 PM, Andy Shevchenko wrote: On Wed, May 30, 2018 at 1:24 AM, Eddie James wrote: From: "Edward A. James" Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. +#include +

Re: [PATCH v7 5/7] drivers/i2c: Add transfer implementation for FSI algorithm

2018-05-30 Thread Eddie James
On 05/29/2018 07:08 PM, Andy Shevchenko wrote: On Wed, May 30, 2018 at 1:24 AM, Eddie James wrote: From: "Edward A. James" Execute I2C transfers from the FSI-attached I2C master. Use polling instead of interrupts as we have no hardware IRQ over FSI. + if (msg->fla

[PATCH v8 7/7] i2c: fsi: Add bus recovery

2018-05-30 Thread Eddie James
Bus recovery should reset the engine and force clock the bus 9 times to recover most situations. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c index

[PATCH v8 6/7] i2c: fsi: Add I2C master locking

2018-05-30 Thread Eddie James
Since there are many ports per master, each with it's own adapter and chardev, we need some locking to prevent transfers from changing the master state while other transfers are in progress. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 16 1 file change

[PATCH v8 0/7] i2c: Add FSI-attached I2C master algorithm

2018-05-30 Thread Eddie James
Fix reset functionality and do a reset after every transfer failure Eddie James (7): dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation i2c: Add FSI-attached I2C master algorithm i2c: fsi: Add port structures i2c: fsi: Add abort and hardware reset procedures i2c: fsi:

[PATCH v8 2/7] i2c: Add FSI-attached I2C master algorithm

2018-05-30 Thread Eddie James
Add register definitions for FSI-attached I2C master and functions to access those registers over FSI. Add an FSI driver so that our I2C bus is probed up during an FSI scan. Signed-off-by: Eddie James --- drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c

[PATCH v8 5/7] i2c: fsi: Add transfer implementation

2018-05-30 Thread Eddie James
Execute I2C transfers from the FSI-attached I2C master. Use polling instead of interrupts as we have no hardware IRQ over FSI. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 196 ++- 1 file changed, 194 insertions(+), 2 deletions(-) diff

[PATCH v8 1/7] dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation

2018-05-30 Thread Eddie James
Document the bindings. Signed-off-by: Eddie James > Acked-by: Rob Herring --- Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt diff --git a/Documentat

[PATCH v8 3/7] i2c: fsi: Add port structures

2018-05-30 Thread Eddie James
Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 90 1 file changed, 90 insertions(+) diff --git a

[PATCH v8 4/7] i2c: fsi: Add abort and hardware reset procedures

2018-05-30 Thread Eddie James
Add abort procedure for failed transfers. Add engine and bus reset procedures to recover from as many faults as possible. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 179 +++ 1 file changed, 179 insertions(+) diff --git a/drivers/i2c

Re: [PATCH v7 3/7] drivers/i2c: Add port structure to FSI algorithm

2018-05-31 Thread Eddie James
On 05/30/2018 04:16 PM, Benjamin Herrenschmidt wrote: On Wed, 2018-05-30 at 10:47 -0500, Eddie James wrote: + if (!list_empty(&i2c->ports)) { My gosh, this is done already in list_for_each*() No, list_for_each_entry does NOT check if the list is empty or if the first entry

[PATCH] fsi: sbefifo: Add missing mutex_unlock

2018-07-03 Thread Eddie James
There was no unlock of the FFDC mutex. Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO") Signed-off-by: Eddie James --- drivers/fsi/fsi-sbefifo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c index 4f076f

[PATCH v11 0/8] i2c: Add FSI-attached I2C master algorithm

2018-07-05 Thread Eddie James
ween sending the command and receiving the response. Changes since v5 - Fix reset functionality and do a reset after every transfer failure Eddie James (8): dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation i2c: Add FSI-attached I2C master algorithm i2c: fsi: Add por

[PATCH v11 6/8] i2c: fsi: Add I2C master locking

2018-07-05 Thread Eddie James
Since there are many ports per master, each with it's own adapter and chardev, we need some locking to prevent transfers from changing the master state while other transfers are in progress. Signed-off-by: Eddie James Reviewed-by: Andy Shevchenko --- drivers/i2c/busses/i2c-fsi.c

[PATCH v11 2/8] i2c: Add FSI-attached I2C master algorithm

2018-07-05 Thread Eddie James
Add register definitions for FSI-attached I2C master and functions to access those registers over FSI. Add an FSI driver so that our I2C bus is probed up during an FSI scan. Signed-off-by: Eddie James Reviewed-by: Andy Shevchenko --- drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses

[PATCH v11 8/8] MAINTAINERS: Add Eddie as the maintainer for the FSI-attached I2C driver

2018-07-05 Thread Eddie James
Signed-off-by: Eddie James --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 10fd4c0..63f6d41 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5888,6 +5888,14 @@ F: fs/crypto/ F: include/linux/fscrypt*.h F: Documentation

[PATCH v11 3/8] i2c: fsi: Add port structures

2018-07-05 Thread Eddie James
Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 91 1 file changed, 91 insertions(+) diff --git a

[PATCH v11 5/8] i2c: fsi: Add transfer implementation

2018-07-05 Thread Eddie James
Execute I2C transfers from the FSI-attached I2C master. Use polling instead of interrupts as we have no hardware IRQ over FSI. Signed-off-by: Eddie James Reviewed-by: Andy Shevchenko --- drivers/i2c/busses/i2c-fsi.c | 195 ++- 1 file changed, 193

[PATCH v11 7/8] i2c: fsi: Add bus recovery

2018-07-05 Thread Eddie James
Bus recovery should reset the bus with the standard i2c recovery procedure. Populate the necessary fields so that the standard procedure can perform the reset. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 132 +++ 1 file changed, 132

[PATCH v11 4/8] i2c: fsi: Add abort and hardware reset procedures

2018-07-05 Thread Eddie James
Add abort procedure for failed transfers. Add engine reset procedure that is executed during the abort to recover from various fault conditions. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 91 1 file changed, 91 insertions(+) diff

[PATCH v11 1/8] dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation

2018-07-05 Thread Eddie James
Document the bindings. Signed-off-by: Eddie James Acked-by: Rob Herring --- Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt diff --git a/Documentation

Re: [PATCH v10 4/7] i2c: fsi: Add abort and hardware reset procedures

2018-07-05 Thread Eddie James
On 07/02/2018 01:15 PM, Wolfram Sang wrote: Hi Eddie, I think this is a way too aggressive recovery. Your are doing the 9 pulse toggles basically on any error while this is only when the device keeps SDA low and you want to recover from that. If SDA is not stuck low, sending a STOP should do

Re: [PATCH v10 5/7] i2c: fsi: Add transfer implementation

2018-07-05 Thread Eddie James
On 07/02/2018 01:24 PM, Wolfram Sang wrote: + if (msg->flags & I2C_M_RD) + cmd |= I2C_CMD_READ; Since you support MANGLING, I'd think you can easily support I2C_M_REV_DIR_ADDR here, too? Hm, I don't really understand the purpose of that flag. From the docs: This toggles

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-13 Thread Eddie James
On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: This was too hard to split ... this adds a number of features to the SCOM user interface: - Support for indirect SCOMs - read()/write() interface now handle errors and retries - New ioctl() "raw" interface for use by debuggers Sig

Re: [RFC PATCH 4/5] fsi/scom: Add register definitions

2018-06-13 Thread Eddie James
On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: Add a few more register and bit definitions, also define and use SCOM_READ_CMD (which is 0 but it makes the code clearer) Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Eddie James --- drivers/fsi/fsi-scom.c | 19

Re: [RFC PATCH 3/5] fsi/scom: Fixup endian annotations

2018-06-13 Thread Eddie James
On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: Use the proper annotated type __be32 and fixup the accessor used for get_scom() Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Eddie James --- drivers/fsi/fsi-scom.c | 9 - 1 file changed, 4 insertions(+), 5 deletions

Re: [RFC PATCH 2/5] fsi/scom: Whitespace fixes

2018-06-13 Thread Eddie James
On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: No functional changes Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Eddie James --- drivers/fsi/fsi-scom.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi

Re: [RFC PATCH 1/5] fsi/scom: Add mutex around FSI2PIB accesses

2018-06-13 Thread Eddie James
On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: Otherwise, multiple clients can open the driver and attempt to access the PIB at the same time, thus clobbering each other in the process. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Eddie James --- drivers/fsi/fsi-scom.c

[PATCH v10 7/7] i2c: fsi: Add bus recovery

2018-06-13 Thread Eddie James
Bus recovery should reset the engine and force clock the bus 9 times to recover most situations. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c index

[PATCH v10 6/7] i2c: fsi: Add I2C master locking

2018-06-13 Thread Eddie James
Since there are many ports per master, each with it's own adapter and chardev, we need some locking to prevent transfers from changing the master state while other transfers are in progress. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 16 1 file change

[PATCH v10 2/7] i2c: Add FSI-attached I2C master algorithm

2018-06-13 Thread Eddie James
Add register definitions for FSI-attached I2C master and functions to access those registers over FSI. Add an FSI driver so that our I2C bus is probed up during an FSI scan. Signed-off-by: Eddie James --- drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c

[PATCH v10 5/7] i2c: fsi: Add transfer implementation

2018-06-13 Thread Eddie James
Execute I2C transfers from the FSI-attached I2C master. Use polling instead of interrupts as we have no hardware IRQ over FSI. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 195 ++- 1 file changed, 193 insertions(+), 2 deletions(-) diff

[PATCH v10 1/7] dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation

2018-06-13 Thread Eddie James
Document the bindings. Signed-off-by: Eddie James > Acked-by: Rob Herring --- Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt diff --git a/Documentat

[PATCH v10 4/7] i2c: fsi: Add abort and hardware reset procedures

2018-06-13 Thread Eddie James
Add abort procedure for failed transfers. Add engine and bus reset procedures to recover from as many faults as possible. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 179 +++ 1 file changed, 179 insertions(+) diff --git a/drivers/i2c

[PATCH v10 0/7] i2c: Add FSI-attached I2C master algorithm

2018-06-13 Thread Eddie James
ot worth the overhead when the wait should be very short in between sending the command and receiving the response. Changes since v5 - Fix reset functionality and do a reset after every transfer failure Eddie James (7): dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation

[PATCH v10 3/7] i2c: fsi: Add port structures

2018-06-13 Thread Eddie James
Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 90 1 file changed, 90 insertions(+) diff --git a

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-14 Thread Eddie James
On 06/13/2018 06:00 PM, Benjamin Herrenschmidt wrote: On Wed, 2018-06-13 at 09:57 -0500, Eddie James wrote: On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: This was too hard to split ... this adds a number of features to the SCOM user interface: - Support for indirect SCOMs

Re: [PATCH v8 2/2] media: platform: Add Aspeed Video Engine driver

2018-12-14 Thread Eddie James
On 12/13/2018 07:09 PM, Joel Stanley wrote: On Wed, 12 Dec 2018 at 04:09, Eddie James wrote: The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs can capture and compress video data from digital or analog sources. With the Aspeed chip acting a service processor, the Video

Re: [PATCH 2/2] clk: aspeed: Setup video engine clocking

2018-12-14 Thread Eddie James
On 12/13/2018 07:02 PM, Joel Stanley wrote: Hi Eddie, On Wed, 12 Dec 2018 at 06:42, Eddie James wrote: Add the video engine reset bit. Add eclk mux and clock divider table. Signed-off-by: Eddie James Acked-by: Stephen Boyd --- drivers/clk/clk-aspeed.c | 41

[PATCH v7 2/2] media: platform: Add Aspeed Video Engine driver

2018-12-10 Thread Eddie James
compress it to JPEG images. Make the video frames available through the V4L2 streaming interface. Signed-off-by: Eddie James --- MAINTAINERS |8 + drivers/media/platform/Kconfig|9 + drivers/media/platform/Makefile |1 + drivers/media/platform

[PATCH v7 0/2] media: platform: Add Aspeed Video Engine driver

2018-12-10 Thread Eddie James
From: Eddie James The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs can capture and compress video data from digital or analog sources. With the Aspeed chip acting as a service processor, the Video Engine can capture the host processor graphics output. This series adds a

[PATCH v7 1/2] dt-bindings: media: Add Aspeed Video Engine binding documentation

2018-12-10 Thread Eddie James
Document the bindings. Signed-off-by: Eddie James Reviewed-by: Rob Herring --- .../devicetree/bindings/media/aspeed-video.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/aspeed-video.txt diff --git a

Re: [PATCH v7 2/2] media: platform: Add Aspeed Video Engine driver

2018-12-11 Thread Eddie James
On 12/11/2018 04:44 AM, Hans Verkuil wrote: On 12/10/18 11:26 PM, Eddie James wrote: The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs can capture and compress video data from digital or analog sources. With the Aspeed chip acting a service processor, the Video Engine can

[PATCH v8 1/2] dt-bindings: media: Add Aspeed Video Engine binding documentation

2018-12-11 Thread Eddie James
Document the bindings. Signed-off-by: Eddie James Reviewed-by: Rob Herring --- .../devicetree/bindings/media/aspeed-video.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/aspeed-video.txt diff --git a

[PATCH v8 0/2] media: platform: Add Aspeed Video Engine driver

2018-12-11 Thread Eddie James
From: Eddie James The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs can capture and compress video data from digital or analog sources. With the Aspeed chip acting as a service processor, the Video Engine can capture the host processor graphics output. This series adds a

[PATCH v8 2/2] media: platform: Add Aspeed Video Engine driver

2018-12-11 Thread Eddie James
compress it to JPEG images. Make the video frames available through the V4L2 streaming interface. Signed-off-by: Eddie James --- MAINTAINERS |8 + drivers/media/platform/Kconfig|9 + drivers/media/platform/Makefile |1 + drivers/media/platform

[PATCH 0/2] clk: aspeed: Setup video engine clocking

2018-12-11 Thread Eddie James
This series adds the parent clock definitions and muxing for the AST2xxx video engine. I sent this series before as part of my first patch set for the video engine, but probably better to send it separately. Eddie James (2): clk: aspeed: Add video engine reset index definition clk: aspeed

[PATCH 1/2] clk: aspeed: Add video engine reset index definition

2018-12-11 Thread Eddie James
Add an index into the array of resets kept in the Aspeed clock driver for the video engine. This isn't a HW bit definition. Signed-off-by: Eddie James Acked-by: Stephen Boyd Reviewed-by: Rob Herring --- include/dt-bindings/clock/aspeed-clock.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 2/2] clk: aspeed: Setup video engine clocking

2018-12-11 Thread Eddie James
Add the video engine reset bit. Add eclk mux and clock divider table. Signed-off-by: Eddie James Acked-by: Stephen Boyd --- drivers/clk/clk-aspeed.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-aspeed.c b/drivers

Re: [PATCH] hwmon (occ): Fix potential integer overflow

2019-01-07 Thread Eddie James
occ->powr_sample_time_us; Thanks, Reviewed-by: Eddie James Addresses-Coverity-ID: 1442357 ("Unintentional integer overflow") Addresses-Coverity-ID: 1442476 ("Unintentional integer overflow") Addresses-Coverity-ID: 1442508 ("Unintentional integer overflow&qu

[PATCH v6 01/10] dt-bindings: fsi: Add P9 OCC device documentation

2018-11-08 Thread Eddie James
From: Eddie James Document the bindings for the FSI-attached POWER9 On-Chip Controller. Signed-off-by: Eddie James --- Documentation/devicetree/bindings/fsi/ibm,p9-occ.txt | 16 1 file changed, 16 insertions(+) create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9

[PATCH v12 0/8] i2c: Add FSI-attached I2C master algorithm

2018-07-17 Thread Eddie James
This series adds an algorithm for an I2C master physically located on an FSI slave device. The I2C master has multiple ports, each of which may be connected to an I2C slave. Access to the I2C master registers is achieved over FSI bus. Due to the multi-port nature of the I2C master, the driver inst

[PATCH v12 3/8] i2c: fsi: Add port structures

2018-07-17 Thread Eddie James
From: "eaja...@linux.vnet.ibm.com" Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. Signed-off-by: Eddie James --- drivers/i2c/busses/i2c-fsi.c | 91 1 fi

  1   2   3   4   5   6   >