From patchwork Wed Oct 18 17:01:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 827759 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ZOtM3SYZ"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yHJJF3NsDz9t3B for ; Thu, 19 Oct 2017 04:02:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750979AbdJRRCD (ORCPT ); Wed, 18 Oct 2017 13:02:03 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:53659 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbdJRRCC (ORCPT ); Wed, 18 Oct 2017 13:02:02 -0400 Received: by mail-pf0-f196.google.com with SMTP id t188so4397432pfd.10; Wed, 18 Oct 2017 10:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=gUdcW2sjlPI3OuTZPOvPmtvSs9y6XAKJdq8ASBFCf3c=; b=ZOtM3SYZpnS/StM77f9ni8pBdKaiFmz6ekiCTxYnSMgYD7PbX1D9yY6m9U370OAMoR 6OQDWKRaUH3shOheIq+n4HodUhO4/Y2tSQERvQjvf2lfh/snHz4T8GkWEP4crn7FMN8Y v9CrQN4IA7UusFzdfQ83XVN9UxrHZA3AkAhNIWqIUj+4135uRlViadpy6u1MXAtNrehr W582AtH/8Uzbwhb2h49G99Mh4V7HSnZgAsP56NQrRpc2AkHp5wXP6hQtmrok2KEDCnRq YEip6R9PZpya7RXHA4j6vlwWHKaxFqqVsP37R17RdIjYyMlvqFC66tpUySJGMH7hr7Ne QXaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gUdcW2sjlPI3OuTZPOvPmtvSs9y6XAKJdq8ASBFCf3c=; b=TsJ9JMBpCcg3ms9GKdVfiN/MuzK9xPvYt34+f3Yx+vZ1MYNxNE+Lvhsj3F0g1A7QmW 11PhtqGyrZPHSPvxclGkNIA/5DxSRAwSpI2EzdWQCpsSETGKMuHEDIl38JdAxkxVYU2h OwxQJnvGo251frumrScnawMoJNIWqhU57YaN0jv2YjD14TR0JysE/m7hqE8MY7lP/XU+ BDBDDOx1Der7aJ85kkODyUj/ZjYVKLWC/OPmIXbxoPr6ogTkD4j/fPHJ5JjeubE8zPgw Q3/d+7tn87+sgvrqdqrWg3dun/xXJyUzRVrLN1hg5NVrDz7Cx44VYzEOuc9m0rx7VG2M vCwA== X-Gm-Message-State: AMCzsaWTVh8j8XwhS2O0bktURB47GlXKrAXeAa4oy6JVN1EHXanKe+Ug +xlazIJ1kwGn5BBe98inT425X5EIsNU= X-Google-Smtp-Source: ABhQp+SiPN0eYEtXAlrzoC9Xt2mzwBjCpci0+YuXZk2zaEZMeQeg4cP4GsGCKC7txn2OvlVgpAeKKg== X-Received: by 10.98.190.7 with SMTP id l7mr3197821pff.309.1508346121777; Wed, 18 Oct 2017 10:02:01 -0700 (PDT) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id t78sm19631223pgb.93.2017.10.18.10.01.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Oct 2017 10:02:00 -0700 (PDT) From: Andrey Smirnov To: linux-kernel@vger.kernel.org Cc: Andrey Smirnov , Pavel Machek , Greg Kroah-Hartman , cphealy@gmail.com, Andy Shevchenko , Lee Jones , Lucas Stach , Nikita Yushchenko , Guenter Roeck , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v8 0/5] ZII RAVE platform driver Date: Wed, 18 Oct 2017 10:01:31 -0700 Message-Id: <20171018170136.12347-1-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.13.5 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi everyone, This patch series is v8 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 is dependent on crc_ccitt_false() 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 * Currently the driver is placed in drivers/platform instead of drivers/mfd as per request from Lee Jones (Lee, if you changed your mind about it, let me know and I'll move the driver back) 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 [v7] lkml.kernel.org/r/20171013061321.31252-2-andrew.smirnov@gmail.com [v6] lkml.kernel.org/r/20170828163131.24815-2-andrew.smirnov@gmail.com [v5] lkml.kernel.org/r/20170728142704.11156-1-andrew.smirnov@gmail.com [v4] lkml.kernel.org/r/20170725184450.13171-1-andrew.smirnov@gmail.com [v3] lkml.kernel.org/r/20170724150915.4824-1-andrew.smirnov@gmail.com [v2] lkml.kernel.org/r/20170718175604.11735-1-andrew.smirnov@gmail.com [v1] lkml.kernel.org/r/20170710170449.4544-1-andrew.smirnov@gmail.com Andrey Smirnov (5): serdev: Make .remove in struct serdev_device_driver optional serdev: Introduce devm_serdev_device_open() platform: 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 | 10 + Documentation/driver-model/devres.txt | 3 + drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 1 + drivers/platform/rave/Kconfig | 25 + drivers/platform/rave/Makefile | 1 + drivers/platform/rave/rave-sp.c | 670 +++++++++++++++++++++ drivers/tty/serdev/core.c | 31 +- drivers/watchdog/Kconfig | 7 + drivers/watchdog/Makefile | 1 + drivers/watchdog/rave-sp-wdt.c | 310 ++++++++++ include/linux/rave-sp.h | 54 ++ include/linux/serdev.h | 1 + 13 files changed, 1114 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt create mode 100644 drivers/platform/rave/Kconfig create mode 100644 drivers/platform/rave/Makefile create mode 100644 drivers/platform/rave/rave-sp.c create mode 100644 drivers/watchdog/rave-sp-wdt.c create mode 100644 include/linux/rave-sp.h