Skip to contentSkip to conversation

ZII RAVE platform driver

PATCH In review Andrey Smirnov 5 participants 17 messages Dec 21, 2017 – Jan 8, 2018

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

v17 cover ZII RAVE platform driver

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

NOTE:

* This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree

Changes since [v16]:

- Fixed commentary style for SPDX tags in .c files

- Collected Ack from Philippe

Changes since [v15]:

- Adopted SPDX tags for licensing information per Philippe's request

Changes since [v14]:

- Fixed a bug in deframer code where byte processing loop was not being terminated early is it should've been. This would result, among other things, in packets of maximum valid length being incorrectly reported as tool long.

- Increased command timeout value in support other valid commands that are outsied of scope for this patch set.

- Converted watchdog driver to differentiate between variants based on its own compatiblity string as opposed to relying on that of parent MFD device (as per request by Johan and Lee).

NOTE: This change didn't seem to change DT bingins enough to warrant dropping any Acks for patches affected, so I kept them. If anyone wants to rescind their Ack, please let me know.

- Collected Acked-by from Pavel

- Collected Acked-by from Lee (for patch 3/5)

Changes since [v13]:

- Fixed incorrect MFD driver menuconfig entry placement

Changes since [v12]:

- Minor comment inconsistencies fixes in rave-sp.c

Changes since [v11]:

- Fix incorrect include in rave-sp-wdt.c as uncovered by kernel test robot

Changes since [v10]:

- Collected Acked-by from Rob and Reviewed-by from Guenter

- Incorporated watchdog driver feedback from Gunter and Johan

- Incorporated Johan's feedback for the rest of the code

Changes since [v9]:

- Converted watchdog driver to use watchdog_active() instead of watchdog_hw_running() and replaced WARN_ON with a regular error message as per feedback from Guenter

- Changed rave_sp_wdt_start() to set WDOG_HW_RUNNING only if communicating with hardware was sucessful

- Collected Reviewd-by from Sebastian (for serdev related patches)

- Collected Acked-by from Rob (for watchdog DT bindings)

Changes since [v8]:

- Driver moved from drivers/platform to drivers/mfd

- Collected Reviewed-by from Guenter (for patches 1, 2 and 3)

- Incorporated feedback from Guenter into watchdog driver

- Incorporated feedback from Rob into watchdog DT bindings

- Removed struct rave_sp_rsp_status, which was a leftover from v5 -> v6 code removal.

- Fixed minor problems reported by checkpatch

Changes since [v7]:

- Added watchdog driver to the patchset, so it would be easier to understand how parent/children drivers are tied together

- Added serdev patches to implement devm_serdev_device_open() and make .remove optional

- "Added" missing serdev_device_close() by converting the driver to use devm_serdev_device_open()

- Converted the driver to use devm_of_platform_populate()

- Removed needless dependency on MFD_CORE

- Removed dependency on SERIAL_DEV_CTRL_TTYPORT

Changes since [v6]:

- Patch 2/2 has been applied by Lee so it is no longer a part of the series

- Removed all sysfs and debugfs attribute to reduce the scope of the driver propsed for inclusion. This is not a critical to have feature and can be added/discussed later.

Changes since [v5]:

- Fixed a build break, introduced by a last minute change in [v5]

- Moved majority of attributes that were exposed over sysfs to debugfs

- Document remaining sysfs attributes in Documentation/ABI/testing/sysfs-platform-rave-sp

Changes since [v4]:

- Replaced usage of DEVICE_ATTR with DEVICE_ATTR_RW

- Fixed a number of warnings produces by sparse tool

- Incorporated event more feedback from Andy Shevchenko

- Collected Reviewed-by from Andy

Changes since [v3]:

- Re-collected lost Acked-by from Rob

- Incorporated further feedback from Andy Shevchenko

- Dropped useless change (stray newline) to drivers/mfd/Makefile

Changes since [v2]:

- Fixed swapped command codes in rave_sp_common_get_boot_source() and rave_sp_common_set_boot_source() revealed by further testing of the code

- Incorporated feedback from Andy Shevchenko

Changes since [v1]:

- Updated wording in DT-bindings as per Rob's request.

- Collected Rob's Acked-by for patch 2/2

Feedback is greatly appreciated!

Thanks,
Andrey Smirnov

[v16] lkml.kernel.org/r/20171220204517.28313-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v15] lkml.kernel.org/r/20171220040017.7605-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v14] lkml.kernel.org/r/20171207162735.25873-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v13] lkml.kernel.org/r/20171204161118.19558-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v12] lkml.kernel.org/r/20171109160556.17018-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v11] lkml.kernel.org/r/20171106152935.16920-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v10] lkml.kernel.org/r/20171031163656.24552-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v9] lkml.kernel.org/r/20171025190421.18415-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v8] lkml.kernel.org/r/20171018170136.12347-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v7] lkml.kernel.org/r/20171013061321.31252-2-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v6] lkml.kernel.org/r/20170828163131.24815-2-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v5] lkml.kernel.org/r/20170728142704.11156-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v4] lkml.kernel.org/r/20170725184450.13171-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v3] lkml.kernel.org/r/20170724150915.4824-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v2] lkml.kernel.org/r/20170718175604.11735-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [v1] lkml.kernel.org/r/20170710170449.4544-1-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Andrey Smirnov (5):
serdev: Make .remove in struct serdev_device_driver optional
serdev: Introduce devm_serdev_device_open()
mfd: Add driver for RAVE Supervisory Processor
watchdog: Add RAVE SP watchdog driver
dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

 .../bindings/watchdog/zii,rave-sp-wdt.txt          |  39 ++
 Documentation/driver-model/devres.txt              |   3 +
 drivers/mfd/Kconfig                                |   8 +
 drivers/mfd/Makefile                               |   2 +
 drivers/mfd/rave-sp.c                              | 710 +++++++++++++++++++++
 drivers/tty/serdev/core.c                          |  31 +-
 drivers/watchdog/Kconfig                           |   7 +
 drivers/watchdog/Makefile                          |   1 +
 drivers/watchdog/rave-sp-wdt.c                     | 337 ++++++++++
 include/linux/mfd/rave-sp.h                        |  60 ++
 include/linux/serdev.h                             |   1 +
 11 files changed, 1197 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt
 create mode 100644 drivers/mfd/rave-sp.c
 create mode 100644 drivers/watchdog/rave-sp-wdt.c
 create mode 100644 include/linux/mfd/rave-sp.h
Signature · 6 lines
2.14.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH v17 1/5 serdev: Make .remove in struct serdev_device_driver optional

Using devres infrastructure it is possible to write a serdev driver that doesn't have any code that needs to be called as a part of .remove. Add code to make .remove optional.

---
 drivers/tty/serdev/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serdev/core.c +2 -2
index 1bef39828ca7..34050b439c1f 100644
@@ -268,8 +268,8 @@ static int serdev_drv_probe(struct device *dev)
 static int serdev_drv_remove(struct device *dev)
 {
 	const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver);
-
-	sdrv->remove(to_serdev_device(dev));
+	if (sdrv->remove)
+		sdrv->remove(to_serdev_device(dev));
 	return 0;
 }
 
Signature · 1 line
2.14.3
#2 lore raw

PATCH v17 2/5 serdev: Introduce devm_serdev_device_open()

In reply to Andrey Smirnov

Add code implementing managed version of serdev_device_open() for serdev device drivers that "open" the device during driver's lifecycle only once (e.g. opened in .probe() and closed in .remove()).

---
 Documentation/driver-model/devres.txt |  3 +++
 drivers/tty/serdev/core.c             | 27 +++++++++++++++++++++++++++
 include/linux/serdev.h                |  1 +
 3 files changed, 31 insertions(+)
Documentation/driver-model/devres.txt +3 -0
index c180045eb43b..7c1bb3d0c222 100644
@@ -384,6 +384,9 @@ RESET
   devm_reset_control_get()
   devm_reset_controller_register()
 
+SERDEV
+  devm_serdev_device_open()
+
 SLAVE DMA ENGINE
   devm_acpi_dma_controller_register()
 
drivers/tty/serdev/core.c +27 -0
index 34050b439c1f..28133dbd2808 100644
@@ -132,6 +132,33 @@ void serdev_device_close(struct serdev_device *serdev)
 }
 EXPORT_SYMBOL_GPL(serdev_device_close);
 
+static void devm_serdev_device_release(struct device *dev, void *dr)
+{
+	serdev_device_close(*(struct serdev_device **)dr);
+}
+
+int devm_serdev_device_open(struct device *dev, struct serdev_device *serdev)
+{
+	struct serdev_device **dr;
+	int ret;
+
+	dr = devres_alloc(devm_serdev_device_release, sizeof(*dr), GFP_KERNEL);
+	if (!dr)
+		return -ENOMEM;
+
+	ret = serdev_device_open(serdev);
+	if (ret) {
+		devres_free(dr);
+		return ret;
+	}
+
+	*dr = serdev;
+	devres_add(dev, dr);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(devm_serdev_device_open);
+
 void serdev_device_write_wakeup(struct serdev_device *serdev)
 {
 	complete(&serdev->write_comp);
include/linux/serdev.h +1 -0
index e69402d4a8ae..9929063bd45d 100644
@@ -193,6 +193,7 @@ static inline int serdev_controller_receive_buf(struct serdev_controller *ctrl,
 
 int serdev_device_open(struct serdev_device *);
 void serdev_device_close(struct serdev_device *);
+int devm_serdev_device_open(struct device *, struct serdev_device *);
 unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int);
 void serdev_device_set_flow_control(struct serdev_device *, bool);
 int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_t);
Signature · 1 line
2.14.3
#3 lore raw

PATCH v17 3/5 mfd: Add driver for RAVE Supervisory Processor

In reply to Andrey Smirnov

Add a driver for RAVE Supervisory Processor, an MCU implementing various bits of housekeeping functionality (watchdoging, backlight control, LED control, etc) on RAVE family of products by Zodiac Inflight Innovations.

This driver implementes core MFD/serdev device as well as communication subroutines necessary for commanding the device.

---
 drivers/mfd/Kconfig         |   8 +
 drivers/mfd/Makefile        |   2 +
 drivers/mfd/rave-sp.c       | 710 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/rave-sp.h |  60 ++++
 4 files changed, 780 insertions(+)
 create mode 100644 drivers/mfd/rave-sp.c
 create mode 100644 include/linux/mfd/rave-sp.h
drivers/mfd/Kconfig +8 -0
index 1d20a800e967..ec90d408bfa9 100644
@@ -1859,5 +1859,13 @@ config MFD_VEXPRESS_SYSREG
 	  System Registers are the platform configuration block
 	  on the ARM Ltd. Versatile Express board.
 
+config RAVE_SP_CORE
+	tristate "RAVE SP MCU core driver"
+	depends on SERIAL_DEV_BUS
+	select CRC_CCITT
+	help
+	  Select this to get support for the Supervisory Processor
+	  device found on several devices in RAVE line of hardware.
+
 endmenu
 endif
drivers/mfd/Makefile +2 -0
index d9474ade32e6..61abc297b97c 100644
@@ -230,3 +230,5 @@ obj-$(CONFIG_MFD_STM32_LPTIMER)	+= stm32-lptimer.o
 obj-$(CONFIG_MFD_STM32_TIMERS) 	+= stm32-timers.o
 obj-$(CONFIG_MFD_MXS_LRADC)     += mxs-lradc.o
 obj-$(CONFIG_MFD_SC27XX_PMIC)	+= sprd-sc27xx-spi.o
+obj-$(CONFIG_RAVE_SP_CORE)	+= rave-sp.o
+
drivers/mfd/rave-sp.c new file +710 -0

710 lines not on this page · raw message

include/linux/mfd/rave-sp.h new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
2.14.3
#4 lore raw

PATCH v17 4/5 watchdog: Add RAVE SP watchdog driver

In reply to Andrey Smirnov

This driver provides access to RAVE SP watchdog functionality.

---
 drivers/watchdog/Kconfig       |   7 +
 drivers/watchdog/Makefile      |   1 +
 drivers/watchdog/rave-sp-wdt.c | 337 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 345 insertions(+)
 create mode 100644 drivers/watchdog/rave-sp-wdt.c
drivers/watchdog/Kconfig +7 -0
index ca200d1f310a..5bf613d3b7d6 100644
@@ -223,6 +223,13 @@ config ZIIRAVE_WATCHDOG
 	  To compile this driver as a module, choose M here: the
 	  module will be called ziirave_wdt.
 
+config RAVE_SP_WATCHDOG
+	tristate "RAVE SP Watchdog timer"
+	depends on RAVE_SP_CORE
+	select WATCHDOG_CORE
+	help
+	  Support for the watchdog on RAVE SP device.
+
 # ALPHA Architecture
 
 # ARM Architecture
drivers/watchdog/Makefile +1 -0
index 715a21078e0c..135c5e81f25e 100644
@@ -224,3 +224,4 @@ obj-$(CONFIG_MAX77620_WATCHDOG) += max77620_wdt.o
 obj-$(CONFIG_ZIIRAVE_WATCHDOG) += ziirave_wdt.o
 obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
 obj-$(CONFIG_MENF21BMC_WATCHDOG) += menf21bmc_wdt.o
+obj-$(CONFIG_RAVE_SP_WATCHDOG) += rave-sp-wdt.o
drivers/watchdog/rave-sp-wdt.c new file +337 -0

337 lines not on this page · raw message

Signature · 1 line
2.14.3
#5 lore raw

PATCH v17 5/5 dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

In reply to Andrey Smirnov

Add Device Tree bindings for RAVE SP watchdog drvier - an MFD cell of parent RAVE SP driver (documented in Documentation/devicetree/bindings/mfd/zii,rave-sp.txt).

---
 .../bindings/watchdog/zii,rave-sp-wdt.txt          | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt
Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt new file +39 -0
new file mode 100644
index 000000000000..3de96186e92e
@@ -0,0 +1,39 @@
+Zodiac Inflight Innovations RAVE Supervisory Processor Watchdog Bindings
+
+RAVE SP watchdog device is a "MFD cell" device corresponding to
+watchdog functionality of RAVE Supervisory Processor. It is expected
+that its Device Tree node is specified as a child of the node
+corresponding to the parent RAVE SP device (as documented in
+Documentation/devicetree/bindings/mfd/zii,rave-sp.txt)
+
+Required properties:
+
+- compatible: Depending on wire protocol implemented by RAVE SP
+  firmware, should be one of:
+	- "zii,rave-sp-watchdog"
+	- "zii,rave-sp-watchdog-legacy"
+
+Optional properties:
+
+- wdt-timeout:	Two byte nvmem cell specified as per
+		Documentation/devicetree/bindings/nvmem/nvmem.txt
+
+Example:
+
+	rave-sp {
+		compatible = "zii,rave-sp-rdu1";
+		current-speed = <38400>;
+
+		eeprom {
+			wdt_timeout: wdt-timeout@8E {
+				reg = <0x8E 2>;
+			};
+		};
+
+		watchdog {
+			compatible = "zii,rave-sp-watchdog";
+			nvmem-cells = <&wdt_timeout>;
+			nvmem-cell-names = "wdt-timeout";
+		};
+	}
+
Signature · 1 line
2.14.3
#6 lore raw
In reply to Andrey Smirnov
Quoted 6 lines

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

query.

Can we please get this patch merged? We really don't want to see v34 of this patch...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
maintainer
#7 lore raw
Quoted 11 lines · Pavel Machek
Quoted 6 lines

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

query.

Can we please get this patch merged? We really don't want to see v34 of this patch...

Maybe if we can all agree that There Shall Be No More Bikeshedding.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 8 lines · Guenter Roeck
Quoted 7 lines · Pavel Machek
Quoted 6 lines

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

Quoted 6 lines
Quoted 4 lines

query.

Can we please get this patch merged? We really don't want to see v34 of this patch...

Maybe if we can all agree that There Shall Be No More Bikeshedding.

I'll bite next person who tries to complain comment style. Grrr.

And actually, you could help, too. Normally it makes sense to wait few days between resubmitting the patch...

Thanks,

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Tested-by Chris Healy on the v17 series
#9 lore raw
In reply to Andrey Smirnov
Quoted 7 lines · Andrey Smirnov

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

Quoted 6 lines

NOTE:

* This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree

Hmm... well that's annoying! I just attempted to merge this set, but early build tests fail due to a dependency already merged into -next.

../drivers/mfd/rave-sp.c:227:25: error:
implicit declaration of function ‘crc_ccitt_false’ [-Werror=implicit-function-declaration]

We need to figure out if either of the following are true:

- Patch [0] can be dropped from Andrew's tree
- ... and I can take it via the MFD tree instead
- Patch [0] is on an immutable branch I can pull in to my PR

If not, it will have to wait until the next cycle.

[0]:

Author: Andrey Vostrikov <[email protected]>
Date:   Mon Dec 25 22:39:57 2017 +1100

lib/crc-ccitt: add CCITT-FALSE CRC16 variant

In support of a soon to be published MFD driver using serdev to talk to a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's protocol, this patch was tested successfully on an i.MX6 ARM platform.

Signature · 4 lines
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw
Quoted 19 lines · Lee Jones
Quoted 7 lines · Andrey Smirnov

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

Quoted 6 lines

NOTE:

* This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree

Hmm... well that's annoying! I just attempted to merge this set, but early build tests fail due to a dependency already merged into -next.

Quoted 8 lines

../drivers/mfd/rave-sp.c:227:25: error:
implicit declaration of function ‘crc_ccitt_false’ [-Werror=implicit-function-declaration]

We need to figure out if either of the following are true:

- Patch [0] can be dropped from Andrew's tree
- ... and I can take it via the MFD tree instead

FWIW, it seems to me that the path above should be doable (and might be simpler?). Let me know if any action needs to be taken on my part.

Thanks,
Andrey Smirnov
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw

Well I guess we better at least include them in the conversation.

Stephen and Andrew added.

Quoted 56 lines · Andrey Smirnov
Quoted 19 lines · Lee Jones
Quoted 7 lines · Andrey Smirnov

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

Quoted 6 lines

NOTE:

* This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree

Hmm... well that's annoying! I just attempted to merge this set, but early build tests fail due to a dependency already merged into -next.

Quoted 8 lines

../drivers/mfd/rave-sp.c:227:25: error:
implicit declaration of function ‘crc_ccitt_false’ [-Werror=implicit-function-declaration]

We need to figure out if either of the following are true:

- Patch [0] can be dropped from Andrew's tree
- ... and I can take it via the MFD tree instead

FWIW, it seems to me that the path above should be doable (and might be simpler?). Let me know if any action needs to be taken on my part.

Thanks,
Andrey Smirnov

Quoted 21 lines

- Patch [0] is on an immutable branch I can pull in to my PR

If not, it will have to wait until the next cycle.

[0]:

Author: Andrey Vostrikov <andrey.vostrikov-M4DtvfQ/[email protected]>
Date:   Mon Dec 25 22:39:57 2017 +1100

lib/crc-ccitt: add CCITT-FALSE CRC16 variant

In support of a soon to be published MFD driver using serdev to talk to a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's protocol, this patch was tested successfully on an i.MX6 ARM platform.

Signature · 8 lines
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Tested-by Chris Healy
#12 lore raw
Quoted 33 lines · On Wed, 3 Jan 2018 09:46:21 +0000 Lee Jones…

Well I guess we better at least include them in the conversation.

Stephen and Andrew added.

Quoted 28 lines · Andrey Smirnov
Quoted 27 lines · Lee Jones
Quoted 7 lines · Andrey Smirnov

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

Quoted 6 lines

NOTE:

* This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree

Hmm... well that's annoying! I just attempted to merge this set, but early build tests fail due to a dependency already merged into -next.

../drivers/mfd/rave-sp.c:227:25: error:
implicit declaration of function ‘crc_ccitt_false’ [-Werror=implicit-function-declaration]

We need to figure out if either of the following are true:

- Patch [0] can be dropped from Andrew's tree
- ... and I can take it via the MFD tree instead

Please merge lib-crc-ccitt-add-ccitt-false-crc16-variant.patch via the MFD tree, along with its user. Here's my copy:

From: Andrey Vostrikov <andrey.vostrikov-M4DtvfQ/[email protected]>
Subject: lib/crc-ccitt: add CCITT-FALSE CRC16 variant

In support of a soon to be published MFD driver using serdev to talk to a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's protocol, this patch was tested successfully on an i.MX6 ARM platform.

---

 include/linux/crc-ccitt.h |    7 ++++
 lib/crc-ccitt.c           |   58 +++++++++++++++++++++++++++++++++++-
 2 files changed, 64 insertions(+), 1 deletion(-)
include/linux/crc-ccitt.h renamed from include/linux/crc-ccitt.h~lib-crc-ccitt-add-ccitt-false-crc16-variant +7 -0
diff -puN include/linux/crc-ccitt.h~lib-crc-ccitt-add-ccitt-false-crc16-variant include/linux/crc-ccitt.h
@@ -5,12 +5,19 @@
 #include <linux/types.h>
 
 extern u16 const crc_ccitt_table[256];
+extern u16 const crc_ccitt_false_table[256];
 
 extern u16 crc_ccitt(u16 crc, const u8 *buffer, size_t len);
+extern u16 crc_ccitt_false(u16 crc, const u8 *buffer, size_t len);
 
 static inline u16 crc_ccitt_byte(u16 crc, const u8 c)
 {
 	return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
 }
 
+static inline u16 crc_ccitt_false_byte(u16 crc, const u8 c)
+{
+    return (crc << 8) ^ crc_ccitt_false_table[(crc >> 8) ^ c];
+}
+
 #endif /* _LINUX_CRC_CCITT_H */
lib/crc-ccitt.c renamed from lib/crc-ccitt.c~lib-crc-ccitt-add-ccitt-false-crc16-variant +57 -1

70 lines not on this page · raw message

_

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw
Quoted 31 lines · Andrew Morton
Quoted 29 lines · On Wed, 3 Jan 2018 09:46:21 +0000 Lee Jones…

Well I guess we better at least include them in the conversation.

Stephen and Andrew added.

Quoted 24 lines · Andrey Smirnov
Quoted 23 lines · Lee Jones
Quoted 7 lines · Andrey Smirnov

Everyone:

This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them.

Quoted 6 lines

NOTE:

* This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree

Hmm... well that's annoying! I just attempted to merge this set, but early build tests fail due to a dependency already merged into -next.

../drivers/mfd/rave-sp.c:227:25: error:
implicit declaration of function ‘crc_ccitt_false’ [-Werror=implicit-function-declaration]

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

We need to figure out if either of the following are true:

- Patch [0] can be dropped from Andrew's tree
- ... and I can take it via the MFD tree instead

Please merge lib-crc-ccitt-add-ccitt-false-crc16-variant.patch via the MFD tree, along with its user. Here's my copy:

Thanks Andrew. This has now been done.

Signature · 8 lines
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#14 lore raw

[GIT PULL] Immutable branch between MFD, TTY and Watchdog due for the v4.16 merge window

In reply to Andrey Smirnov

Enjoy!

The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:

Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-tty-watchdog-v4.16

for you to fetch changes up to a8b751eb709ecefe0a81a0112d9c01b2181a3efa:

dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver (2018-01-08 10:08:37 +0000)

----------------------------------------------------------------
Immutable branch between MFD, TTY and Watchdog due for the v4.16 merge window

----------------------------------------------------------------
Andrew Morton (1):
lib/crc-ccitt: Add CCITT-FALSE CRC16 variant

Andrey Smirnov (5):
serdev: Make .remove in struct serdev_device_driver optional
serdev: Introduce devm_serdev_device_open()
mfd: Add driver for RAVE Supervisory Processor
watchdog: Add RAVE SP watchdog driver
dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

 .../bindings/watchdog/zii,rave-sp-wdt.txt          |  39 ++
 Documentation/driver-model/devres.txt              |   3 +
 drivers/mfd/Kconfig                                |   8 +
 drivers/mfd/Makefile                               |   2 +
 drivers/mfd/rave-sp.c                              | 710 +++++++++++++++++++++
 drivers/tty/serdev/core.c                          |  31 +-
 drivers/watchdog/Kconfig                           |   7 +
 drivers/watchdog/Makefile                          |   1 +
 drivers/watchdog/rave-sp-wdt.c                     | 337 ++++++++++
 include/linux/crc-ccitt.h                          |   7 +
 include/linux/mfd/rave-sp.h                        |  60 ++
 include/linux/serdev.h                             |   1 +
 lib/crc-ccitt.c                                    |  58 +-
 13 files changed, 1261 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt
 create mode 100644 drivers/mfd/rave-sp.c
 create mode 100644 drivers/watchdog/rave-sp-wdt.c
 create mode 100644 include/linux/mfd/rave-sp.h
Signature · 8 lines
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#15 lore raw

Re: [GIT PULL] Immutable branch between MFD, TTY and Watchdog due for the v4.16 merge window

Quoted 12 lines · Lee Jones

Enjoy!

The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:

Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-tty-watchdog-v4.16

for you to fetch changes up to a8b751eb709ecefe0a81a0112d9c01b2181a3efa:

Quoted 8 lines

dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver (2018-01-08 10:08:37 +0000)

----------------------------------------------------------------
Immutable branch between MFD, TTY and Watchdog due for the v4.16 merge window

----------------------------------------------------------------
Andrew Morton (1):
lib/crc-ccitt: Add CCITT-FALSE CRC16 variant

Ah bum! Looks like my scripts has taken Andrew as the author.

PLEASE DO NOT PULL THIS REQUEST (YET!)

Signature · 8 lines
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#16 lore raw

Re: [GIT PULL] Immutable branch between MFD, TTY and Watchdog due for the v4.16 merge window

Quoted 19 lines · Lee Jones
Quoted 17 lines · Lee Jones

Enjoy!

The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:

Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-tty-watchdog-v4.16

for you to fetch changes up to a8b751eb709ecefe0a81a0112d9c01b2181a3efa:

dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver (2018-01-08 10:08:37 +0000)

----------------------------------------------------------------
Immutable branch between MFD, TTY and Watchdog due for the v4.16 merge window

Quoted 7 lines
Quoted 3 lines

----------------------------------------------------------------
Andrew Morton (1):
lib/crc-ccitt: Add CCITT-FALSE CRC16 variant

Ah bum! Looks like my scripts has taken Andrew as the author.

PLEASE DO NOT PULL THIS REQUEST (YET!)

Okay, it's fixed. Pull away.

Details (repo, tag, etc) are the same.

---------------------------------------------------------

FYI:

The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:

Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-tty-watchdog-v4.16

for you to fetch changes up to d1903daa662baf170513da3a9090ac56d3dbfbf6:

dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver (2018-01-08 11:12:33 +0000)

----------------------------------------------------------------
Immutable branch between MFD and TTY and Watchdog due for the v4.16 merge window

----------------------------------------------------------------
Andrey Smirnov (5):
serdev: Make .remove in struct serdev_device_driver optional
serdev: Introduce devm_serdev_device_open()
mfd: Add driver for RAVE Supervisory Processor
watchdog: Add RAVE SP watchdog driver
dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

Andrey Vostrikov (1):
lib/crc-ccitt: Add CCITT-FALSE CRC16 variant

 .../bindings/watchdog/zii,rave-sp-wdt.txt          |  39 ++
 Documentation/driver-model/devres.txt              |   3 +
 drivers/mfd/Kconfig                                |   8 +
 drivers/mfd/Makefile                               |   2 +
 drivers/mfd/rave-sp.c                              | 710 +++++++++++++++++++++
 drivers/tty/serdev/core.c                          |  31 +-
 drivers/watchdog/Kconfig                           |   7 +
 drivers/watchdog/Makefile                          |   1 +
 drivers/watchdog/rave-sp-wdt.c                     | 337 ++++++++++
 include/linux/crc-ccitt.h                          |   7 +
 include/linux/mfd/rave-sp.h                        |  60 ++
 include/linux/serdev.h                             |   1 +
 lib/crc-ccitt.c                                    |  58 +-
 13 files changed, 1261 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt
 create mode 100644 drivers/mfd/rave-sp.c
 create mode 100644 drivers/watchdog/rave-sp-wdt.c
 create mode 100644 include/linux/mfd/rave-sp.h
Signature · 4 lines
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog