From patchwork Wed Sep 4 13:33:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11130307 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 292891398 for ; Wed, 4 Sep 2019 13:34:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ECF3822CEA for ; Wed, 4 Sep 2019 13:34:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="dumOSBT7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730410AbfIDNeK (ORCPT ); Wed, 4 Sep 2019 09:34:10 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:61249 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730372AbfIDNeK (ORCPT ); Wed, 4 Sep 2019 09:34:10 -0400 Received-SPF: Pass (esa6.microchip.iphmx.com: domain of Eugen.Hristev@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="Eugen.Hristev@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; spf=Pass smtp.mailfrom=Eugen.Hristev@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: 9dw5Mu3yhRdDcPFjSifBpK+zJ3Fx6AgA/qBqGpnFGoxWh7h5uiAadfGZT14N3VNZmx3nXt5VQq wW+x2xBvxSE88TtLB+L9gkd/y6b9Xw+l5tV17ZfEbOWAWgg07pa8xW6qw8DpI9WGJcyVDKGh24 sA1j7iIG5pfvIEOxrmEAkOdidFxXHKsvU4TjDw0eZXIxvC8pgZEh1pBqlzZSUgjzY0wLUbU8X/ 33E01owDmo0Wh3iN9Ga6Xj1tF3mclC2FLl8WG2L62ox0uCeg6ox+jcNnOsQUap//lRotPgH9zR iYk= X-IronPort-AV: E=Sophos;i="5.64,467,1559545200"; d="scan'208";a="44886834" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Sep 2019 06:33:59 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 4 Sep 2019 06:33:59 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 4 Sep 2019 06:33:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PoD+cN6xnTjIJhIusdi48GLFU5maKM6lk1w6nyHeTX5RLerlZNs54hSnUES2MKiYFFUd23zWtq6SMiqhNaq2VzBwa4VM48f+X4vw7kVqhtrWTNAZxrzcQbjNgRCsuUW38ds+nwbEC4ED7tov8zWLl6cRw2pbowg5LxTGM0CSNyM8jPHLirtvU32ivuphCDup7Db+6UxcacxkO1cdVPVZ+e2AHXCGbF/DM/gQPd+pu8+v5+a7RwXUPVKtlXoSIfbp4tQ2SAzePY1mQ+e6lZo7UjTVvVhxXjPkLC55jvq/0wXwRO+EPoBqf3GGJXIk5pujaWRPOZyd6dlKVQB/Z85bGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=98r8VA+FBvuG3VHyYEAgjOVqSria5MDROp5XaDP8ggE=; b=hW303OuouJAqR5wEDOlFU1+ENISuTO+bDopMFwasKiE4Ssxz7QjoHdeqdpls0evhtZctGryd08nEyGQOlluReV7ST3dLJ+VgsxuikV+KqCt64DQ9E1c+d3AJZWXZ4oI5PKph/k28VUDrN0ZQebMqDLPQdQyC57MvdIoktOXk49/W7SfNaFFi/grzqUaJ71PjqfmkM2SDw2lfj3fpYYhICW0oU0ICXcdq6eJmbRnjRrVP5TXZl4BW8PtVHmpw4qLDLn7ZX00E8gN+ykW5QriQI7lo24c8QXB8b3Ba1beUW3Emud33jkQwN8GvoexFcp3AoQyE5bj0lbdUt85EPx6W2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=98r8VA+FBvuG3VHyYEAgjOVqSria5MDROp5XaDP8ggE=; b=dumOSBT70/dmps/e2WYO0qJXv0BN4nG3Pf/tvj22RR0Vk90R4Xplj4g1Dl588W7bKYb02ptiFv2nwtaqHMmkrbC/on+QE42XQE1I+c7atE2uZCzGjSOAEtvASnn1XmyBt4sacwcKLb6zA+EKIdl9PctPFdXv1bncNyB6bon1xcc= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB1786.namprd11.prod.outlook.com (10.175.91.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.21; Wed, 4 Sep 2019 13:33:55 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::a141:1974:9668:fbe2]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::a141:1974:9668:fbe2%12]) with mapi id 15.20.2241.014; Wed, 4 Sep 2019 13:33:55 +0000 From: To: , , , , CC: , Subject: [PATCH 1/2] staging: dt-bindings: wilc1000: add optional rtc_clk property Thread-Topic: [PATCH 1/2] staging: dt-bindings: wilc1000: add optional rtc_clk property Thread-Index: AQHVYyVmBkghZ7w+IkiStodl6jvpxA== Date: Wed, 4 Sep 2019 13:33:55 +0000 Message-ID: <1567603548-13355-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: en-US, ro-RO Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0043.eurprd09.prod.outlook.com (2603:10a6:802:28::11) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) x-mailer: git-send-email 2.7.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.156] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 15457870-b926-4380-f340-08d7313c887d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:DM5PR11MB1786; x-ms-traffictypediagnostic: DM5PR11MB1786: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 0150F3F97D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(396003)(39860400002)(366004)(136003)(346002)(189003)(199004)(8676002)(99286004)(6486002)(478600001)(110136005)(52116002)(316002)(86362001)(107886003)(2501003)(4326008)(2201001)(3846002)(25786009)(6512007)(6436002)(305945005)(7736002)(53936002)(14454004)(6116002)(54906003)(66476007)(66556008)(186003)(66946007)(102836004)(64756008)(256004)(2906002)(26005)(6506007)(66446008)(14444005)(386003)(5660300002)(66066001)(486006)(81166006)(8936002)(476003)(2616005)(71200400001)(50226002)(71190400001)(81156014)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR11MB1786;H:DM5PR11MB1242.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 7h6OhCJEIm7PuI15KWQ9CW7f5KTlM46hfTQJrUdeSzKuqilkmSfxowSOc+qbep1cuWyDNnNPsN2J8ohntEv4fFYhdRCk4THwaZnuklpPExxmDMSgdc5x6IC23udXCsBVUHP0k59CM5hlaBJKq4TTjSsph6roKJsXDmVxLRZFHktIr2R7bm3LXf0bVlMdXdCkHKERzq01rjVBDqiGZ7TyyzNUa2dYsS6W8DBzDRUbzKLoiVsWtmF13c4rWmOhqFM/+k7lFIQGC5m/vLFuhTYqw9ScEqL3VbizXapVpqkSGj3aU3+7DsPQ4Z7IExs9jcQZL0DPkE45Om4MyXkhWu7YCZ7F2aHpkH0CVkQnLOSCx/8tFeM1cwVeYj7lS2Cv3FjJ0VAwUDyVmqTIgh6VQULELJv9olttbVGDNUvx2xOcRhU= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 15457870-b926-4380-f340-08d7313c887d X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2019 13:33:55.7807 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0TPtse8eIEEYYGMtnqaLI16gd+AzJkPiGe02r6FZ+dh5KRj7/KlLVHhTVVhPQnmgZs1zNaK8/hw+zO8w03YWjsIIHZhOhcRASRYECGioZos= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1786 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Eugen Hristev Add bindings for optional rtc clock pin. Signed-off-by: Eugen Hristev Acked-by: Ajay Singh --- drivers/staging/wilc1000/microchip,wilc1000,sdio.txt | 8 +++++++- drivers/staging/wilc1000/microchip,wilc1000,spi.txt | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/microchip,wilc1000,sdio.txt b/drivers/staging/wilc1000/microchip,wilc1000,sdio.txt index 4f7d1c2..da52359 100644 --- a/drivers/staging/wilc1000/microchip,wilc1000,sdio.txt +++ b/drivers/staging/wilc1000/microchip,wilc1000,sdio.txt @@ -10,7 +10,9 @@ Required properties: Optional: - bus-width : Number of data lines wired up the slot. Default 1 bit. - +- rtc_clk : Clock connected on the rtc clock line. Must be assigned + a frequency with assigned-clocks property, and must be + connected to a clock provider. Examples: mmc1: mmc@fc000000 { @@ -24,6 +26,10 @@ mmc1: mmc@fc000000 { wilc_sdio@0 { compatible = "microchip,wilc1000-sdio"; irq-gpios = <&pioC 27 0>; + clocks = <&pck1>; + clock-names = "rtc_clk"; + assigned-clocks = <&pck1>; + assigned-clock-rates = <32768>; status = "okay"; reg = <0>; bus-width = <4>; diff --git a/drivers/staging/wilc1000/microchip,wilc1000,spi.txt b/drivers/staging/wilc1000/microchip,wilc1000,spi.txt index 87db87b..3423693 100644 --- a/drivers/staging/wilc1000/microchip,wilc1000,spi.txt +++ b/drivers/staging/wilc1000/microchip,wilc1000,spi.txt @@ -9,6 +9,10 @@ Required properties: - reg : Chip select address of device - irq-gpios : Connect to a host IRQ +Optional: +- rtc_clk : Clock connected on the rtc clock line. Must be assigned + a frequency with assigned-clocks property, and must be + connected to a clock provider. Examples: @@ -21,6 +25,10 @@ spi1: spi@fc018000 { spi-max-frequency = <48000000>; reg = <0>; irq-gpios = <&pioC 27 0>; + clocks = <&pck1>; + clock-names = "rtc_clk"; + assigned-clocks = <&pck1>; + assigned-clock-rates = <32768>; status = "okay"; }; }; From patchwork Wed Sep 4 13:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11130305 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DEB461399 for ; Wed, 4 Sep 2019 13:34:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACB9D22CED for ; Wed, 4 Sep 2019 13:34:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="V4DdyP5x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730386AbfIDNeE (ORCPT ); Wed, 4 Sep 2019 09:34:04 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:24302 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730372AbfIDNeE (ORCPT ); Wed, 4 Sep 2019 09:34:04 -0400 Received-SPF: Pass (esa3.microchip.iphmx.com: domain of Eugen.Hristev@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="Eugen.Hristev@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.microchip.iphmx.com; spf=Pass smtp.mailfrom=Eugen.Hristev@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: lCLqNMme6uIG3+gM/x2tSSttw/YZTttPDeNp548+D1uvXU8Rp7wwt13eva8muX7AIy5pNn2wLt vVAEeU0HWriDrweUM4TIi78bZPHnEKe4G+/JxrF4wd7oOwV9bSGOk8VVaN1cBrdIdSHVfRK7/W oY4ls3AoWCdmSe90GdWjA7ExavZEvapXHV63Kgk66XhTh5mTQSWBZzmEg03/LUMMqaTFYCvhpU +VycDI46SvDM48javd+TOBRkqR4jCfPr4pxCGnEkkPGoSJj9vU5uAyiNDAA6KrKFJu+DWh7pXE Eck= X-IronPort-AV: E=Sophos;i="5.64,467,1559545200"; d="scan'208";a="47757053" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Sep 2019 06:34:03 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 4 Sep 2019 06:34:04 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 4 Sep 2019 06:34:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QpoO9lp5UCtukFrUcIHKNiWHXRHAdVOegGJqd8s7i4W/AvQsg7OJxo4agBU5gVdQOUz/phmEajdgYreAQz0dtDYGv4TtohhlvRI+wjls4I/L6iOKZaRKlwZtZ+qGFSOVJMToc1uHGe+0h9z6aLhgLqGJKa8YhgG7/Fk/Ut4ICsYAsIruOM+t3pxZ7r9i9IB/GZmETwVZGRKeCCTxnOkZKbSamEeBJn0+rC58u1V0lI2cw/QQlQcXQNFp0AcsncMt9oMuP25KBr4Q+kUtRfAib1Brw8DnE9Z1JgvWDLaiBSzOZRCJB4b1LR25MtEy2thNedtsB7WpfPJYpiioigf6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XoHRcMVMOHlD2VYOGr5941LLK6YfhVlGzC9doEyuLk0=; b=jML4mX91tJul2QqopFpzkjM0AK5wzsxoQ0Ol1ooicJtdv22OSvimCIF3/lFZA847RUZbZpLj1VPLuy0lbjOTxdMsQGAUGXoU2MwnTxXDM5d8sTaJBuYv/QAL0Xj3+UWS83366T06KwWZK3PoIgBDkya5OQnWZabvO+QiSvptjVMWhRkrr3Fr30jo4On3jozU0pA2BU/Jpcbo8KyWwnB0SjgtKBXblfyoXGy1BFwfqqdH4GnS9l+nG4x5YKatRWoXhPRfJ9/bw2b0RnfIiLwMS/PjNJ6sRpU9yWap/E3CKl4u3JmuqJEM3BwQGo3huWiSRNwORtDzHkasmrTbMGRJFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XoHRcMVMOHlD2VYOGr5941LLK6YfhVlGzC9doEyuLk0=; b=V4DdyP5x+TwoGxGAHSvq3vpDZG1AXJzwRNmnn3ZLr28qgvD0tuTSal7dIy6oI93HavSXnVoTH3oBp/t3XmRco7MRi1xUIWb20RyDRKwVi96CGYwEB1dzQV7e11SVtyY/YlZ1/hkJqf5vPXQoHQoQgzJNfXHWmJfkMLXeezCIZbg= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB1786.namprd11.prod.outlook.com (10.175.91.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.21; Wed, 4 Sep 2019 13:34:01 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::a141:1974:9668:fbe2]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::a141:1974:9668:fbe2%12]) with mapi id 15.20.2241.014; Wed, 4 Sep 2019 13:34:01 +0000 From: To: , , , , CC: , Subject: [PATCH 2/2] staging: wilc1000: look for rtc_clk clock Thread-Topic: [PATCH 2/2] staging: wilc1000: look for rtc_clk clock Thread-Index: AQHVYyVpLOW1Mruv6EeGi5027BzJDg== Date: Wed, 4 Sep 2019 13:34:01 +0000 Message-ID: <1567603548-13355-2-git-send-email-eugen.hristev@microchip.com> References: <1567603548-13355-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1567603548-13355-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: en-US, ro-RO Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0043.eurprd09.prod.outlook.com (2603:10a6:802:28::11) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) x-mailer: git-send-email 2.7.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.156] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ae377a61-bf31-4ad0-3bad-08d7313c8c0f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:DM5PR11MB1786; x-ms-traffictypediagnostic: DM5PR11MB1786: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 0150F3F97D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(376002)(396003)(39860400002)(366004)(136003)(346002)(189003)(199004)(8676002)(99286004)(6486002)(478600001)(110136005)(52116002)(316002)(86362001)(107886003)(2501003)(4326008)(2201001)(3846002)(25786009)(6512007)(6436002)(305945005)(7736002)(53936002)(14454004)(6116002)(54906003)(76176011)(66476007)(66556008)(186003)(66946007)(102836004)(64756008)(256004)(2906002)(26005)(6506007)(66446008)(14444005)(386003)(5660300002)(66066001)(486006)(81166006)(8936002)(476003)(2616005)(71200400001)(11346002)(446003)(50226002)(71190400001)(81156014)(36756003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR11MB1786;H:DM5PR11MB1242.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: mm34tIVN4xq2NWoe2kM/KyOMS6V6AnLF16DQw1pAznTmqF4kTvOodKODDd07UBcBnWWxaaUSoaqn97Of0o7PMgT1MJ1Gy66woo6vjrNJpQHfVKWPCgncQ/9mu9Cn1VHRiZ8zdAf4IGdKdBlFwuvtvAPnGG+o9eMlonKb05ED2VFjV4dn/8rDOUYXu9sLbNRRDkoBUMixyn4qO4Qz3PsmGWrkjO3Af2SFlshHHHCiT+yKPnS/hifeShlmb18dbRcauBC1f6XwWZKe3hNPHvf95i3ywJn2LpzxkcBtJYCDWKCJ/k1I0NE8MfDWrgxju/YU1FsAKvjZrHGiYp6ISkPcAwEz5PXj7Zp9nFuCwrNPO6AmupBtOswp2mR+xVEKHpx8R/NYro7IV3qrt8SbgiRXZS3XvAcE6ukCicY6guXKqiQ= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ae377a61-bf31-4ad0-3bad-08d7313c8c0f X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2019 13:34:01.6280 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4xisQkuMrRRMjq52kJiIDxNMFw78Wfc4HABwCsg4VsdZakyleL4pQY6L5mc/agIO1fJUMwiyl1e+GgW6RYBqT07cJHvfVeYsnzeGt2rsB/o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1786 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Eugen Hristev If rtc_clk is provided from DT, use it and enable it. This is optional. The signal may be hardcoded and no need to be requested, but if DT provides it, use it. Signed-off-by: Eugen Hristev --- drivers/staging/wilc1000/wilc_sdio.c | 14 ++++++++++++++ drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + 2 files changed, 15 insertions(+) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 4c1c81f..41b69fd 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -4,6 +4,7 @@ * All rights reserved. */ +#include #include #include @@ -151,6 +152,12 @@ static int wilc_sdio_probe(struct sdio_func *func, wilc->dev = &func->dev; wilc->gpio_irq = gpio; + wilc->rtc_clk = devm_clk_get(&func->card->dev, "rtc_clk"); + if (PTR_ERR_OR_ZERO(wilc->rtc_clk) == -EPROBE_DEFER) + return -EPROBE_DEFER; + else if (!IS_ERR(wilc->rtc_clk)) + clk_prepare_enable(wilc->rtc_clk); + dev_info(&func->dev, "Driver Initializing success\n"); return 0; } @@ -162,6 +169,10 @@ static void wilc_sdio_remove(struct sdio_func *func) /* free the GPIO in module remove */ if (wilc->gpio_irq) gpiod_put(wilc->gpio_irq); + + if (!IS_ERR(wilc->rtc_clk)) + clk_disable_unprepare(wilc->rtc_clk); + wilc_netdev_cleanup(wilc); } @@ -193,6 +204,9 @@ static int wilc_sdio_suspend(struct device *dev) dev_info(dev, "sdio suspend\n"); chip_wakeup(wilc); + if (!IS_ERR(wilc->rtc_clk)) + clk_disable_unprepare(wilc->rtc_clk); + if (!wilc->suspend_event) { wilc_chip_sleep_manually(wilc); } else { diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 1e74a08..d8f3ebe 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -217,6 +217,7 @@ struct wilc { int io_type; s8 mac_status; struct gpio_desc *gpio_irq; + struct clk *rtc_clk; bool initialized; int dev_irq_num; int close;