From patchwork Fri Apr 22 15:33:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tthayer@opensource.altera.com X-Patchwork-Id: 8912881 Return-Path: X-Original-To: patchwork-linux-hwmon@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E4E009F1D3 for ; Fri, 22 Apr 2016 15:29:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 948B920225 for ; Fri, 22 Apr 2016 15:29:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05BE1201EF for ; Fri, 22 Apr 2016 15:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932209AbcDVP3g (ORCPT ); Fri, 22 Apr 2016 11:29:36 -0400 Received: from mail-bn1bon0061.outbound.protection.outlook.com ([157.56.111.61]:54240 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754462AbcDVP3J (ORCPT ); Fri, 22 Apr 2016 11:29:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=H70mNAbaPsd+F7C5P+yO5gvBxWidEu4JT5PT0bHLtIw=; b=l55hjtkTDG26rGwQMC8TqJZ4JpnMUunk8caHWpJIFyvY7v0VrsBTEAk/z0PGkrhYHYzJNNkCCB1WTSVQzyCttXzsL1KD6bjlDlmC7p8LZEscnQ1+3vdxv+3TmG2VtBzSFUSL9qyAINqhdrz3MA1/5DGcJPFkkaCJ5IWDlYmL6X4= Received: from BLUPR0301CA0042.namprd03.prod.outlook.com (10.162.113.180) by BN3PR03MB2273.namprd03.prod.outlook.com (10.166.74.22) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 15:28:59 +0000 Received: from BN1AFFO11FD010.protection.gbl (2a01:111:f400:7c10::179) by BLUPR0301CA0042.outlook.office365.com (2a01:111:e400:5259::52) with Microsoft SMTP Server (TLS) id 15.1.466.19 via Frontend Transport; Fri, 22 Apr 2016 15:28:58 +0000 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; hellion.org.uk; dkim=pass (signature was verified) header.d=altera.onmicrosoft.com; hellion.org.uk; dmarc=none action=none header.from=opensource.altera.com; Received-SPF: Fail (protection.outlook.com: domain of opensource.altera.com does not designate 66.35.236.236 as permitted sender) receiver=protection.outlook.com; client-ip=66.35.236.236; helo=sj-itexedge04.altera.priv.altera.com; Received: from sj-itexedge04.altera.priv.altera.com (66.35.236.236) by BN1AFFO11FD010.mail.protection.outlook.com (10.58.52.70) with Microsoft SMTP Server (TLS) id 15.1.472.8 via Frontend Transport; Fri, 22 Apr 2016 15:28:57 +0000 Received: from na01-bl2-obe.outbound.protection.outlook.com (207.46.163.208) by webmail.altera.com (66.35.236.236) with Microsoft SMTP Server (TLS) id 14.3.174.1; Fri, 22 Apr 2016 08:26:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=H70mNAbaPsd+F7C5P+yO5gvBxWidEu4JT5PT0bHLtIw=; b=l55hjtkTDG26rGwQMC8TqJZ4JpnMUunk8caHWpJIFyvY7v0VrsBTEAk/z0PGkrhYHYzJNNkCCB1WTSVQzyCttXzsL1KD6bjlDlmC7p8LZEscnQ1+3vdxv+3TmG2VtBzSFUSL9qyAINqhdrz3MA1/5DGcJPFkkaCJ5IWDlYmL6X4= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=opensource.altera.com; Received: from tthayer-HP-Z620-Ubuntu.137.57.187.33 (64.129.157.38) by BLUPR03MB1476.namprd03.prod.outlook.com (10.163.81.18) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 15:28:50 +0000 From: To: , , , , , , , , , CC: , , , Thor Thayer Subject: [PATCH 03/11] mfd: altr_a10sr: Add Altera Arria10 DevKit System Resource Chip Date: Fri, 22 Apr 2016 10:33:31 -0500 Message-ID: <1461339219-15255-4-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1461339219-15255-1-git-send-email-tthayer@opensource.altera.com> References: <1461339219-15255-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: SN1PR0701CA0013.namprd07.prod.outlook.com (10.162.96.23) To BLUPR03MB1476.namprd03.prod.outlook.com (10.163.81.18) X-MS-Office365-Filtering-Correlation-Id: 2220587e-198b-4ba3-1530-08d36ac2d316 X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1476; 2:VQrk7oFrvpAO29b0OZqvuFV2DtUL3WJ+E9HpSxFb0CASx6+PFRHhVuO9FzpOx6cOBYW3emgPDQAC5zx1YgFy2pPB8W+jzkHe+Yekqq/3lUFn/+4wQIzPo4+SfH4UWgsoqeikToL4Ull4iqOt95wXyfv5r+c1i3FMW3XLrUqZZtNoH6fWDb5+NGOB+aqadPbG; 3:oYcn4xNbtgr2o0012wcwupF5mlmCCButzH3ikQQOHvY0Iq3CyXvp61oI53FXRZPTz8Oy2oQbymLHW+XAkr2c1wI4nB9bQ15DBJDWaBhU4zzT6gwHbPwVgV5Zoi2vmNFQ X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1476; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1476; 25:gCilZjiaxfGHc4eb8zHjUtI2DnUce5QAlZiB9sePsh6aMMMZvZnj44Md4ihLy7s+H1eGteK9TLDt3JegWfNSSubK4j4wiRpczdueeBGX9e1H4bw9vDtgHGNUrMQE/qbj7nauZ1wl5I5+TbQci6DzGQs/3o5fcQO/qfJq+mu9K5yhvWLxUhsV4x2iS+CMJcLU56eTPFipK8u1S7zM8F+Ti44R5Gd+DOAIvS/GFhpcoLiEb5B2tsnCas5G3zqdiUpmhE5FZHnoKPkkEZisyGCHIjMLlIOxp/YGEIVu4H5jmtkGkcn9bYI1y74X7hbMgoYYdKWah7AJ7u6p2G2CYqL23Jlxodr/n5EzqgSzV8xzfQybyhSa+he5QcR40g7VYBz4aSP075MCMnxbvGa20Q9N7RZEW1keshTOJauzQwTOPLM7kWwEOGs/j5jh/MLaVkLuUQC3cJOY0QCdMNwVok/I7sNMZux/RetT+RqHxaMca/YcCiNHbszHzqtpPWUr/7EJW5GDeyNHXUnwyTghyidaJjQkVK0VRGMWjthna+7/0DYeffGqrepDIzNTJes6omPESxkmBV+prTMEmXjAzG3+ThbL9m5NdSc7FdsdH5vlL3HImP2fZ4k2LU35aReAfJK2qYa3o3SsVTsCPHHHOLoYOXteHm8GWZDggFyx2LH/SgRyWrtMpahaJKgYRnrabFmve2PLC/sybNmS7ifWC4nrt7HnIeLz8Wu3z6LWMRwo8+s=; 20:qikOx+w//1AlJ9FRV3ujTtYXpSW8GwXkbypecCsyafi8qYXX9hmR5dICpyIz3prme5YnjM7TCS/W9QwJuhIn5rxRkpVr8KYSGztEEXdC0C/wgfK3VY4tXUVRKE/T8GTemT8FxlL5LSq9koyIWF0Imp4mNqfJI5YiUeKfsH5hiwI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521026)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR03MB1476; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1476; BCL:0; PCL:0; RULEID:(9101521026)(601004)(2401047)(13017025)(13024025)(8121501046)(13018025)(5005006)(13015025)(13023025)(10201501046)(3002001); SRVR:BN3PR03MB2273; BCL:0; PCL:0; RULEID:; SRVR:BN3PR03MB2273; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1476; 4:3Ik0Z1J6BhP/QobitIKVPai0srtwoE8WIQtA+xUXY1y9uHPBJ9V4gv8KZ4tAP7KFzeSpCJg8hp+RZW0UUlIUEHnK2k90M7kGnUhx6zENNVg1VLx4yN2ewB70xjAmwUJC5L6r08dc9NlQKDk/bbbK7l53WZ9BN0/l+QzKA9WTuDuf8yAUBNc/XazO9uhcjs6Qx/jTfc7MpZZnMDvBYS4v2ClOSZrE7PLjefsHwGpV7fzcxeNGbhrTEgLN2gQo7Krsz8UTQnj3OVT06mp4jwjJ7ecLLPufO9dh633LYOFv3RDvfcZLUEi1vRQlYos6L90NL7DhX2fhha6iiGTZcKNWCxyPN6ycUl5/U6WT8wxC3P12Y/ribs+cRfPNyLj2SFoFJGSuOpDpYGd52RjluR6yOw== X-Forefront-PRVS: 0920602B08 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6049001)(6009001)(15975445007)(1096002)(6116002)(19580395003)(19580405001)(2201001)(50466002)(48376002)(86152002)(3846002)(4326007)(2906002)(5004730100002)(86362001)(33646002)(2876002)(2950100001)(77096005)(229853001)(575784001)(66066001)(76176999)(47776003)(5001770100001)(189998001)(586003)(4001430100002)(4001450100002)(42186005)(81166005)(107886002)(50986999)(5003940100001)(97736004)(92566002)(5008740100001)(50226001)(2004002)(921003)(4720700001)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1476; H:tthayer-HP-Z620-Ubuntu.137.57.187.33; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1; BLUPR03MB1476; 23:ZXxasxBdJleLIC/R7jWEpvMAZCn9SdohrgNdYhHhf?= =?us-ascii?Q?gvrrG/4BwIwFHOAeYSo1Y/FO4/Dn2VU3yK/psXCCZTlFf0mTctqxUVzt++xX?= =?us-ascii?Q?7SM1KlpzsR+TdKtmpfRXBxSMrMpBR0z0BslJf2o41XuIRA34MyJ2qLxyMmng?= =?us-ascii?Q?XVf5LIshh3YgrGu7pk5QuuO3KFcEMpvdjabKcqmEottl14eH8AIiG5snU035?= =?us-ascii?Q?56DlbGMlkxG6pOt0N9e92YODQnhN9kotajOHpxRSRgIMJwQ68hC2XgrC0c0n?= =?us-ascii?Q?YiAkT/s6CL8JB29txacbWEaBWW6nWCQU/6/z+zAWODrMbRAxWOps/VrUMh9B?= =?us-ascii?Q?487YArikrwQJOa5WHL2OXCR7tmGkRMh3Hj8tWVridAv+1bhAs11vUytZghK6?= =?us-ascii?Q?hsTuh3RNVTU/i1m5XKr6ZeUB7tWvhN9X3Y8M1szrPPRHIskud5q+uI27MAn7?= =?us-ascii?Q?1EJTSbWAEKa0zY0P0sevxc7fv5M2r8HSVEqezkr0IaLKbMCgy7LssbM8NVBE?= =?us-ascii?Q?5qwkTncHGgHOd7GR99CSUikGTQxyPgeAn008Vi6OCmVivmSoSCnYSnJTz+rI?= =?us-ascii?Q?Rz9FmCjeLLrEkxhN4oWC+bTCXp6xK3ICfqMOm2sS1VEv0lXV0/s38toPw18p?= =?us-ascii?Q?/isIRrXcYWUkXSGOX5rkHqVKvletgoIaSMrAcQOqodJ5OeKn6N9G7gUxfxu8?= =?us-ascii?Q?9jPZ+LqTIiF5d6TpQxABEzHwoE9ocVph9YQmASfmiSOje3fX8sjA9mEcv67S?= =?us-ascii?Q?23s2G+Lf04w4+6R4JQ4QesRQXutpJBwBeXxJbDfpyf4TM8HMLTPYdXHfgzew?= =?us-ascii?Q?c5iV9WWi92Rp9e+y/6W98QH/NXQjlRe0pY6WGq0vmEAMtZM+TxPe77wrO59V?= =?us-ascii?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HLUbbtw9Jfdr1o6LBUVNp+BqtfUD85cyfhI2P8lKbt4lFF9Snwjkcio+xjySGb4QSdGFK+s79BRkKeLAEekMbZE5sopRNNBM75Ofy7aNZKqZw1RcuZ+IRsO+oOGVQ7Bt9bSuMnUJzomvb49tcYQvJIwiECukbjtE= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1476 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1AFFO11FD010.protection.gbl X-Forefront-Antispam-Report: CIP:66.35.236.236; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(956001)(575784001)(50226001)(86362001)(3720700001)(229853001)(4001430100002)(87936001)(19580395003)(85426001)(2201001)(19580405001)(86152002)(50986999)(76176999)(5008740100001)(16796002)(6806005)(189998001)(5003940100001)(5004730100002)(107886002)(21840400001)(5001770100001)(4326007)(2876002)(33646002)(92566002)(48376002)(1096002)(4001450100002)(106466001)(66066001)(47776003)(50466002)(1220700001)(81166005)(15975445007)(77096005)(105606002)(97736004)(3846002)(586003)(2906002)(6116002)(2950100001)(7099028)(921003)(2004002)(4720700001)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2273; H:sj-itexedge04.altera.priv.altera.com; FPR:; SPF:Fail; MLV:ovrnspm; A:0; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD010; 1:q/wCCPU91X2gxXi2AAG17eZVXIbpVZ22KlaO93xPuN2Iw1bnx6i/w9TDwT+VQHkTGUXoa1wHEnmHMBDtjXkYqugsbNmGRz34pyTmIEyubNfbvs3SqYTPdjI4M/oC4vmKXJ6nwOgOUVttJdE8fWsH4gij2crFfGOVNjXJK4BFnxvPF6ao8Cqv/M6UymMVLvZIL13SKfUkLWQOxBQYuYj7E2O0YXi9Im6A9E3jv2rqnlwbzWC8iY/ZjMPWdzHbirUHmJp6i0YPcN0JZs+0WJe0vFbhY8zdVkh24v/q30H9uMAYJl4bx1sLgcTD+Cyficy+jWGxPm7kyFD4cR1KIIllfvCfy+UjKo7QRuvPA3aEmQJUUGsXixoDrixQi2ZphGvL6SWEWvrr9SDr8US0nGLWg7MVpHB9UVtMysMUMfdraIS6C50YXqmFZppEjKgMSst226SgaEVHHF4pJHMTYy8w5JylnDYJUS4u1cIUh/qr2fFf7SSw0sqtmtSELdZmdUlKTZmUVZ+ssmc5Pz8eRuTsJhEBHL5MOlhfdCgP2wKo9ICK9cLrOVLDd9Kl6IIdBupc X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2273; 2:g912gKsUKJG2CP1aJrSHDDqS4709ZPwuDPhfrY8S/idtDTOOznC59pkGsgHa5GJLqOimYDfkbidOk8kGN4g9GGTypd+B/wUqZpnrmgmF+zr2EQcgPt/g91VNK4awTk6GJ9JdYsf0gIvFR3isITRcPZOTM6P40XOMPC8/mMIipoXyjqvkwwvsQTYAM+CUtb5z; 3:MlUVjEDQRBWNOS0UkKhGEdRJau3duMv3fs1FmoPZt233jzjqUZQjv3X0A+Fqszz5f4xQgcFooMGgsCtxBMdWLTGG6q1dD7uIlGAI7Lg+4yki7cUIyn19s0eUCy/9jv3JxRmYjx2gjU9PF47AZSrLcfojtB22zF1oq651Eiz1lQDxZV/iVXIdAFFcOHaoLFan4kYP/15UxchUTFeRkZsJSZIqVoQR5P00v3K/EO0LiA2rnONH+Z9dHVJjGFTIXtZs X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3001016); SRVR:BN3PR03MB2273; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2273; 25:ta+1M2Ih2yS7v+e199fnWnms8ljCgf63PH2PEoZ04KholaaYZNXov1VJIamUi+1mGcrikWFXcO2xekY4a96r9pGOsH4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T0743EeDLVZk6UxuAVkZlytp0bUMIiTWvIXysGi9gMaU/40Hya?= =?us-ascii?Q?vGqBXa6Rm8E7BMi1LtUp+U9dZt/CmYkMBbWigXs++YL+oVRMWD5j08ehwipQ?= =?us-ascii?Q?7myZPVE6CaBE1BkMR/cO3z/Y0Q6+7kSXQ3t2W0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2273; 5:AAdQvuSNitzR4F/aknsM9ITB4E2YquRMcFLbvyGX6yVeScgzFa9/G6GEL4I+nJ47ix4Ol5CblUNXVQhv+Z+r6EvZYuVfHkOUNr7bq5QhPgzHLq4ejBzmNWR9jv4IeuThTwIkunNj+urLqe7p/wdfOKSX+9J0mjLUUCOX/BBmPPJ3l2mValSs+mVPRniuvUzP; 24:YDJPSUQHBeh9A2//Tu6RF+8E/52ytENNXFZHrKVYCyeo5npioqDaDxX129OC11RZV/RWR+CPU/SjyjW8uluEq2Cm9BQoWC0GhcrX9nZPRvc=; 7:Qd99GoG1aylwNcNwC7OJhqh6nMoZPwYssUa/gc97dkk8ehqwaBikVzaEHQ0tjxCmZ1/M9SlrvYd7VPtoOVhKOxm1fG5O5CP8iEproGkM3nY+UPgA7AV9iVoSUsRvrMjQ5AeTRZax6c0v3yLXM/wc3sVogqaZZ/0zC2FLdxmAalhVnXt4Hz7YtYcy1HsPdt0wBOervdVe+CxFGxmwApcCAA==; 20:x7qG9VyE8kDR1p4wUYsPLxFJYaS52yH228zpy2IarqU1Yis7LTbVlLoMduA236nljUh/RapbEEeMbTazEhyBQqornlX/s019BoIZArjkPiYagfctYwFZO0QKVcjxYinWgs9OxJ+WSjr1xIzUr2low1KLHp39iHpv44BjMsBnv7M= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 15:28:57.9523 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a; Ip=[66.35.236.236]; Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2273 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer Add support for the Altera Arria10 Development Kit System Resource chip which is implemented using a MAX5 as a external gpio extender, and power supply alarm (hwmon) with the regmap framework over a SPI bus. Signed-off-by: Thor Thayer --- drivers/mfd/Kconfig | 11 +++ drivers/mfd/Makefile | 2 + drivers/mfd/altera-a10sr.c | 179 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/altera-a10sr.h | 87 ++++++++++++++++++ 4 files changed, 279 insertions(+) create mode 100644 drivers/mfd/altera-a10sr.c create mode 100644 include/linux/mfd/altera-a10sr.h diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index eea61e3..4fc27c6 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -18,6 +18,17 @@ config MFD_CS5535 This is the core driver for CS5535/CS5536 MFD functions. This is necessary for using the board's GPIO and MFGPT functionality. +config MFD_ALTERA_A10SR + bool "Altera Arria10 DevKit System Resource chip" + depends on ARCH_SOCFPGA && SPI_MASTER=y && OF + select REGMAP_SPI + select MFD_CORE + help + Support for the Altera Arria10 DevKit MAX5 System Resource chip + using the SPI interface. This driver provides common support for + accessing the external gpio extender (LEDs & buttons) and + power supply alarms (hwmon). + config MFD_ACT8945A tristate "Active-semi ACT8945A" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 5eaa6465d..4f1ff91 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -203,3 +203,5 @@ intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o intel-soc-pmic-$(CONFIG_INTEL_PMC_IPC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o obj-$(CONFIG_MFD_MT6397) += mt6397-core.o + +obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o diff --git a/drivers/mfd/altera-a10sr.c b/drivers/mfd/altera-a10sr.c new file mode 100644 index 0000000..2ff08e3 --- /dev/null +++ b/drivers/mfd/altera-a10sr.c @@ -0,0 +1,179 @@ +/* + * Copyright Altera Corporation (C) 2014-2016. All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + * + * SPI access for Altera Arria10 MAX5 System Resource Chip + * + * Adapted from DA9052 + * Copyright(c) 2011 Dialog Semiconductor Ltd. + * Author: David Dajun Chen + */ + +#include +#include +#include +#include +#include + +static const struct mfd_cell altr_a10sr_subdev_info[] = { + { + .name = "altr_a10sr_gpio", + .of_compatible = "altr,a10sr-gpio", + }, +}; + +static bool altr_a10sr_reg_readable(struct device *dev, unsigned int reg) +{ + switch (reg) { + case ALTR_A10SR_VERSION_READ: + case ALTR_A10SR_LED_REG: + case ALTR_A10SR_PBDSW_REG: + case ALTR_A10SR_PBDSW_IRQ_REG: + case ALTR_A10SR_PWR_GOOD1_REG: + case ALTR_A10SR_PWR_GOOD2_REG: + case ALTR_A10SR_PWR_GOOD3_REG: + case ALTR_A10SR_FMCAB_REG: + case ALTR_A10SR_HPS_RST_REG: + case ALTR_A10SR_USB_QSPI_REG: + case ALTR_A10SR_SFPA_REG: + case ALTR_A10SR_SFPB_REG: + case ALTR_A10SR_I2C_M_REG: + case ALTR_A10SR_WARM_RST_REG: + case ALTR_A10SR_WR_KEY_REG: + case ALTR_A10SR_PMBUS_REG: + return true; + default: + return false; + } +} + +static bool altr_a10sr_reg_writeable(struct device *dev, unsigned int reg) +{ + switch (reg) { + case ALTR_A10SR_LED_REG: + case ALTR_A10SR_PBDSW_IRQ_REG: + case ALTR_A10SR_FMCAB_REG: + case ALTR_A10SR_HPS_RST_REG: + case ALTR_A10SR_USB_QSPI_REG: + case ALTR_A10SR_SFPA_REG: + case ALTR_A10SR_SFPB_REG: + case ALTR_A10SR_WARM_RST_REG: + case ALTR_A10SR_WR_KEY_REG: + case ALTR_A10SR_PMBUS_REG: + return true; + default: + return false; + } +} + +static bool altr_a10sr_reg_volatile(struct device *dev, unsigned int reg) +{ + switch (reg) { + case ALTR_A10SR_PBDSW_REG: + case ALTR_A10SR_PBDSW_IRQ_REG: + case ALTR_A10SR_PWR_GOOD1_REG: + case ALTR_A10SR_PWR_GOOD2_REG: + case ALTR_A10SR_PWR_GOOD3_REG: + case ALTR_A10SR_HPS_RST_REG: + case ALTR_A10SR_I2C_M_REG: + case ALTR_A10SR_WARM_RST_REG: + case ALTR_A10SR_WR_KEY_REG: + case ALTR_A10SR_PMBUS_REG: + return true; + default: + return false; + } +} + +const struct regmap_config altr_a10sr_regmap_config = { + .reg_bits = 8, + .val_bits = 8, + + .cache_type = REGCACHE_NONE, + + .use_single_rw = true, + .read_flag_mask = 1, + .write_flag_mask = 0, + + .max_register = ALTR_A10SR_WR_KEY_REG, + .readable_reg = altr_a10sr_reg_readable, + .writeable_reg = altr_a10sr_reg_writeable, + .volatile_reg = altr_a10sr_reg_volatile, + +}; + +static int altr_a10sr_spi_probe(struct spi_device *spi) +{ + int ret; + struct altr_a10sr *a10sr; + + a10sr = devm_kzalloc(&spi->dev, sizeof(*a10sr), + GFP_KERNEL); + if (!a10sr) + return -ENOMEM; + + spi->mode = SPI_MODE_3; + spi->bits_per_word = 8; + spi_setup(spi); + + a10sr->dev = &spi->dev; + + spi_set_drvdata(spi, a10sr); + + a10sr->regmap = devm_regmap_init_spi(spi, &altr_a10sr_regmap_config); + if (IS_ERR(a10sr->regmap)) { + ret = PTR_ERR(a10sr->regmap); + dev_err(&spi->dev, "Failed to allocate register map: %d\n", + ret); + return ret; + } + + ret = mfd_add_devices(a10sr->dev, PLATFORM_DEVID_AUTO, + altr_a10sr_subdev_info, + ARRAY_SIZE(altr_a10sr_subdev_info), + NULL, 0, NULL); + if (ret) + dev_err(a10sr->dev, "Failed to register sub-devices: %d\n", + ret); + + return ret; +} + +static int altr_a10sr_spi_remove(struct spi_device *spi) +{ + mfd_remove_devices(&spi->dev); + + return 0; +} + +static const struct of_device_id altr_a10sr_spi_of_match[] = { + { .compatible = "altr,a10sr" }, + { }, +}; +MODULE_DEVICE_TABLE(of, altr_a10sr_spi_of_match); + +static struct spi_driver altr_a10sr_spi_driver = { + .probe = altr_a10sr_spi_probe, + .remove = altr_a10sr_spi_remove, + .driver = { + .name = "altr_a10sr", + .of_match_table = of_match_ptr(altr_a10sr_spi_of_match), + }, +}; + +module_spi_driver(altr_a10sr_spi_driver); + +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Thor Thayer "); +MODULE_DESCRIPTION("Altera Arria10 DevKit System Resource MFD Driver"); diff --git a/include/linux/mfd/altera-a10sr.h b/include/linux/mfd/altera-a10sr.h new file mode 100644 index 0000000..c869fe7 --- /dev/null +++ b/include/linux/mfd/altera-a10sr.h @@ -0,0 +1,87 @@ +/* + * Copyright Altera Corporation (C) 2014-2016. All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + * + * Declarations for Altera Arria10 MAX5 System Resource Chip + * + * Adapted from DA9052 + * Copyright(c) 2011 Dialog Semiconductor Ltd. + * Author: David Dajun Chen + */ + +#ifndef __MFD_ALTERA_A10SR_H +#define __MFD_ALTERA_A10SR_H + +#include +#include +#include +#include +#include + +/* Write registers are always on even addresses */ +#define WRITE_REG_MASK 0xFE +/* Odd registers are always on odd addresses */ +#define READ_REG_MASK 0x01 + +#define ALTR_A10SR_BITS_PER_REGISTER 8 +/* + * To find the correct register, we divide the input GPIO by + * the number of GPIO in each register. We then need to multiply + * by 2 because the reads are at odd addresses. + */ +#define ALTR_A10SR_REG_OFFSET(X) (((X) / ALTR_A10SR_BITS_PER_REGISTER) << 1) +#define ALTR_A10SR_REG_BIT(X) ((X) % ALTR_A10SR_BITS_PER_REGISTER) +#define ALTR_A10SR_REG_BIT_CHG(X, Y) ((X) << ALTR_A10SR_REG_BIT(Y)) +#define ALTR_A10SR_REG_BIT_MASK(X) (1 << ALTR_A10SR_REG_BIT(X)) + +/* Arria10 System Controller Register Defines */ +#define ALTR_A10SR_NOP 0x00 /* No Change */ +#define ALTR_A10SR_VERSION_READ 0x00 /* MAX5 Version Read */ + +#define ALTR_A10SR_LED_REG 0x02 /* LED - Upper 4 bits */ +/* LED register Bit Definitions */ +#define ALTR_A10SR_LED_VALID_SHIFT 4 /* LED - Upper 4 bits valid */ +#define ALTR_A10SR_OUT_VALID_RANGE_LO ALTR_A10SR_LED_VALID_SHIFT +#define ALTR_A10SR_OUT_VALID_RANGE_HI 7 + +#define ALTR_A10SR_PBDSW_REG 0x04 /* PB & DIP SW - Input only */ +#define ALTR_A10SR_PBDSW_IRQ_REG 0x06 /* PB & DIP SW Flag Clear */ +/* Pushbutton & DIP Switch Bit Definitions */ +#define ALTR_A10SR_IN_VALID_RANGE_LO 8 +#define ALTR_A10SR_IN_VALID_RANGE_HI 15 + +#define ALTR_A10SR_PWR_GOOD1_REG 0x08 /* Power Good1 Read */ +#define ALTR_A10SR_PWR_GOOD2_REG 0x0A /* Power Good2 Read */ +#define ALTR_A10SR_PWR_GOOD3_REG 0x0C /* Power Good3 Read */ +#define ALTR_A10SR_FMCAB_REG 0x0E /* FMCA/B & PCIe Pwr Enable */ +#define ALTR_A10SR_HPS_RST_REG 0x10 /* HPS Reset */ +#define ALTR_A10SR_USB_QSPI_REG 0x12 /* USB, BQSPI, FILE Reset */ +#define ALTR_A10SR_SFPA_REG 0x14 /* SFPA Control Reg */ +#define ALTR_A10SR_SFPB_REG 0x16 /* SFPB Control Reg */ +#define ALTR_A10SR_I2C_M_REG 0x18 /* I2C Master Select */ +#define ALTR_A10SR_WARM_RST_REG 0x1A /* HPS Warm Reset */ +#define ALTR_A10SR_WR_KEY_REG 0x1C /* HPS Warm Reset Key */ +#define ALTR_A10SR_PMBUS_REG 0x1E /* HPS PM Bus */ + +/** + * struct altr_a10sr - Altera Max5 MFD device private data structure + * @dev: : this device + * @regmap: the regmap assigned to the parent device. + */ +struct altr_a10sr { + struct device *dev; + struct regmap *regmap; +}; + +#endif /* __MFD_ALTERA_A10SR_H */