From patchwork Fri Apr 22 15:33:38 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: 8912891 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 6EFDD9F1D3 for ; Fri, 22 Apr 2016 15:29:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 16EB120212 for ; Fri, 22 Apr 2016 15:29:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FAAE20108 for ; Fri, 22 Apr 2016 15:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754403AbcDVP3k (ORCPT ); Fri, 22 Apr 2016 11:29:40 -0400 Received: from mail-bn1bon0092.outbound.protection.outlook.com ([157.56.111.92]:59798 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932187AbcDVP3R (ORCPT ); Fri, 22 Apr 2016 11:29:17 -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=HveSZzsOUb5Isv6NIJM12plKQwaq5tp0ieGUoP/HOVU=; b=FNeSTJd+FTT6a4wmni5B0xvbZCi2pysyowhrJ2D9Q69MwZ4jH+rK0R0fdgqWp6skdnz4oevZGqL91Fh4SahYR6qPdJOEe+WLOF4DRIXg4siLuB6pimk8EbUnpFJTqO+4d6fW3TzpVe0WbjWnO2SEjLAI3yX3enHJZ4/FHzEizeM= Received: from BLUPR0301CA0025.namprd03.prod.outlook.com (10.162.113.163) by CY1PR03MB2284.namprd03.prod.outlook.com (10.166.207.24) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 15:29:08 +0000 Received: from BN1AFFO11FD010.protection.gbl (2a01:111:f400:7c10::144) by BLUPR0301CA0025.outlook.office365.com (2a01:111:e400:5259::35) with Microsoft SMTP Server (TLS) id 15.1.466.19 via Frontend Transport; Fri, 22 Apr 2016 15:29:08 +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:29:07 +0000 Received: from na01-bn1-obe.outbound.protection.outlook.com (207.46.163.142) by webmail.altera.com (66.35.236.236) with Microsoft SMTP Server (TLS) id 14.3.174.1; Fri, 22 Apr 2016 08:27:04 -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=HveSZzsOUb5Isv6NIJM12plKQwaq5tp0ieGUoP/HOVU=; b=FNeSTJd+FTT6a4wmni5B0xvbZCi2pysyowhrJ2D9Q69MwZ4jH+rK0R0fdgqWp6skdnz4oevZGqL91Fh4SahYR6qPdJOEe+WLOF4DRIXg4siLuB6pimk8EbUnpFJTqO+4d6fW3TzpVe0WbjWnO2SEjLAI3yX3enHJZ4/FHzEizeM= 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:59 +0000 From: To: , , , , , , , , , CC: , , , Thor Thayer Subject: [PATCH 10/11] hwmon: Add Altera A10-SR power supply alarms Date: Fri, 22 Apr 2016 10:33:38 -0500 Message-ID: <1461339219-15255-11-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: 691cece6-adcc-4d73-b1e9-08d36ac2d8ac X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1476; 2:XhPN8MVGZzdUjzRpwhu2bUQboC2v2BnS27vMS4KJoW3yjqjT8NsJpikN7V5hRXGT7gHI+E2Oe8OYeznb5HJFXrsEjgQeO0bbQvTGr90VkRKJxU5Mwfbw5M8R1D/4OHClaAqAQJkIUfgGBbfOJtVD7C1SaReBe6W51kwV07anaeNZFLeXdiwysGHmvg5VvSBF; 3:sA3E2eqe3hA88hfcIzmhyrXzINTiGeW7ih3hbXEnoP3GRi/PndopGtU5A5LFesfLfmFpNMCntHm+FcKPHfcUV7y23cHJ6TsEQE/4G8+JmBvqTd3tjYrYbkzviSsRVSK6; 25:P/zcCqhWwcXNFAxfkgUCIvLjxSUuMHGXS+OMjCeZDxsG620p8bTRdsZd8UVCmJQudB8MTn0/sjeMpZ7aF8VP3A6uhpF/A6QiC5w1MfL2uBd36PQcUvp/4fJn51Yf9qDbSKm5bezC+egA1F/gQI37rhhXzup2B73UtKW9SlJ1+BzAMt5DDkOrTMa0D55lSUlbA+YS5l7s5ht+Hdz9fHFkUQ+swNk9tLi4Uv8u1S47VDYKOo6KDpDBO9Y1siIdzuKQEpg4QavyMlUoI2h0N9IDXCKHkRDr1cVih8WAGlilT4EP+fwZUC2Xq+6ucrz2zny2NXsJJ9jJeEdPkcBS27XRBw==; 20:luZWsEWJnHzGulz5+y8Po3Yx1EyS3vgJI7D54NTPeJwtOYlrd/XEfsvNtDHZZ+5Rpfi7ppqgJ3wJ1/VpjCxVzgWQ5X31/PY7HTgt8mzyZka6Ra4rp7/VFJjerq75wRhueio9ZOdIqRW8M2EjL/zgojW4RzTDN/Uj1ZzgIstACpw= X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1476; 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)(8121501046)(13017025)(5005006)(13018025)(13023025)(13024025)(13015025)(10201501046)(3002001); SRVR:CY1PR03MB2284; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB2284; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1476; 4:zkAXX4YMCr+cMMx0ZYcBxSW2mVeFLcUvTVKHtYRdleFKdbnoJOZs8uYBHeYNWsKO7utl+Z4lzqvnsvbHh38BcrixDLiZsQ3xNeMU5b+mPXr6GEpEYj7t7SeXcnJ95KuKSGy9XqWgA1xSwtbXdsJSuP3RxPM094+EXFEAsRd3TAEFHnSlx1zZKzCXbcH+3V5ngNmKrbsJ3wz8ROW5JwUrM10g1Fe+mDr5haIT8MYaYGdaJ48UzRUOtneEDuB0Jr4Pk4Gftg3UNKy0k2r6fkXnv2CzQc5uOGbxlJzZnqLcMH/4voPspcyS/wiYayPPbcIoxI+l7ZNHsPoXaqpnqfyecyN0LFCxmZLs1RnApSBUmpOcpaTA5cSztstKNKcQ+hDKmPZzLnl9GYP0MxK02FTVDw== X-Forefront-PRVS: 0920602B08 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(15975445007)(1096002)(6116002)(19580395003)(19580405001)(2201001)(50466002)(48376002)(86152002)(3846002)(4326007)(2906002)(5004730100002)(86362001)(33646002)(2876002)(2950100001)(77096005)(229853001)(66066001)(76176999)(47776003)(5001770100001)(189998001)(586003)(4001430100002)(4001450100002)(42186005)(81166005)(107886002)(50986999)(5003940100001)(92566002)(5008740100001)(50226001)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1476; H:tthayer-HP-Z620-Ubuntu.137.57.187.33; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1; BLUPR03MB1476; 23:5capv0e11Xb81I9d8VuBqCqxs+7TxV73CikkdD2m1?= =?us-ascii?Q?Tr4/4JbQfWiyORe4ttZG2LSEt17wx+pIllQ8oJcXcqdtDUI9v8Tp4qcoW+Qt?= =?us-ascii?Q?KhO+KSw1T49LV2iUVjXmGGif3+93eJJMoE5V00slWK8aNgE+QYVInH0J1YxU?= =?us-ascii?Q?ulgKF+TKTX7nCnyEb258NNO+aJI4/U7DL+hcSl6Um+KFOgVVRWgwmAIFKAiC?= =?us-ascii?Q?ek9eTfkO1hqk6Tme3XzuxWhDGQ2SWEQkIQcHceo3QZtvR2p3QR0yKX7cY/AC?= =?us-ascii?Q?hNTw3Zf7JjiFGEZxgl4MVfAaqXePBMuSzzASjL6FvYlxffyRdWpXtoRmDXfR?= =?us-ascii?Q?7eEMFZxHA7wqUSoWHRrDpFmXkdJbgPCcVOp21G4qxbIYDZspWPLzsvrgWN+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25PPifJ70bN7uDnymSJ6sJ2CXeNwOlvKP+LBwPw/IQUhgWBMuK0wnTwBCr/4soBF44Pt3AweF377r5OeX; 24:m3BqIKNhqpTiQ7USO1nDieoEpRrfPUSKg7n8Q1DhabLxXNOemzdDbZUW9HABcMdbG73hy4ZXOKNHC+pLHHYTruL6/W5FoxPD1f+Ot0UiaWw=; 7:hg4wDJwQvV5lBkZkfe5qdrr/ATDN9wDZzAUzPySoAQfAAj+qAJWcB440zmDNB6LggovNjOsxwoUmm9ImY+EWowvDjtf/wnXy5sQlpvXqIPbgln8W0OOUNcdbzbUcyxzGcbauxvuIr5gn9TuAlNGutY5vgpm02fm52pG4A7+umFo9tUc8Xf392i1TBci9vP1ZRc2QVTKajIiI5tW0LN7iIFIF22VihWq20UO8ODxRz6s=; 20:T9ynCZDC2wIZ0jCdzEZbwL8nJKexdbDDd43i1lwSgaCK6cqXICrmGyFpCRUc5AURRpJF7a8ZTbG9tngMSMID2syqC24veRbx9EZRYATMsrgiWQXEzlX7xm5+kHn6xwpJucT+UnK0PBOByofo0vWXskzELIswrv7DfWH1q7feiQE= 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)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(229853001)(92566002)(48376002)(6116002)(3846002)(50466002)(105606002)(106466001)(5003940100001)(33646002)(4001450100002)(19580405001)(19580395003)(5004730100002)(586003)(3720700001)(1096002)(956001)(81166005)(1220700001)(86152002)(85426001)(77096005)(189998001)(4326007)(5008740100001)(86362001)(2201001)(50226001)(6806005)(15975445007)(47776003)(87936001)(66066001)(107886002)(16796002)(50986999)(2950100001)(11100500001)(4001430100002)(2906002)(2876002)(5001770100001)(76176999)(7099028)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2284; H:sj-itexedge04.altera.priv.altera.com; FPR:; SPF:Fail; MLV:sfv; A:0; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD010; 1:ADXOIuy+IveswQBqXC+x8DjHekHqp0B+xi6ZFNtdZb64FMsAgUVHU/+/gfmcWugOKxJe8wkIPbnj5hD85FpN3PPhKwG1ZKJFm5iJ4dKatH+H5Wm3VrbxB3mt8Cp1+jTkUo0XwQ+z6KBEBJ9FlzBqel5bs6bUwG6tg42t1X7V6Cdq5NAINxniSEvIJihWb7mKhAqB1Ng5LO73M2mLtoV4hi5SliagzgJsuO+9JJ72ChhhsxXydZvmho81FWGQJmR6y0FLB0vBYCCxry2mJPiPBbMvFm15Ly2HQ4CliKS+f2TH6TyrsaxIfav1RjTAJtjzOI5kcg7943DshjDnQrXbbAWQpsS7pMI5Yj5vDftDgJFT5Je/5gjt7ZzwG0RroJes75w4UDD0BE383itaFJWY7uYmTIIe73Zf9VxQmlXilKUGqMroctQco0uHg5+r+ZN40rkdYxNr0RGtMZc10Gq3QdsjyewxM2uy7BzFD9ffrbTWbd9iow8mwZiHUSSThPExhxRfFp+jkfzxVjr+HTXYNOq+jfROtrIaFwBvLMdcC8jEVSKsAb6+yJ//a+TsBHVj X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2284; 2:hoRc3VvJPrsw/AQ9JWEeDSVzUlXxkDScAdAQIZo2BNhZJzv282gfMQZtOqBeI3Ht9pqGUrjuHVfPWL5Zo8agazoNfeQXH9k+tcGlTPA70L19ELOMJ+rfmznBR9uye8Xh1opX+MTNV+qZVaHpzQlP4+UKPdsQpTYts3GsQyNxhEvp1W4FOeLmzF+wy0aXFGdV; 3:a92MNq4Bu8JoBWAxDRF3Ll5IN8PTwOmTFliEYwCOkf9QinTm2SzsQHtU2DkKQQMWnHC6hK87zaNAz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z2IaYPwCNXSfRulAMcll9OSKpt5uwfN5kK7uEzZvwpGgUEBT/yG5G/3D2PdklcnC5U1Zg8JY4HjA5S5JauMPvMRR03PS+dOW475tk5H/XVLGd+LLWUYo8hVWW/BnSVXb39uUcMnl/jz3NUc6VzKx1/rfYA9Vx4TZb4K8kcLWKK1IwWKxGtn2mQAtWnTZBa3VxghH/1+8poAePlTXtNMhErE4dp+aVobsaPfKCBwO9jXM4un/sEH8= X-Forefront-PRVS: 0920602B08 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2284; 23:rnL1qFhjCQFuMo8KBMNVUbhcuPf6367oFMECxqkik?= =?us-ascii?Q?oNjMMmnPN3geF1RY9UPLnyg4PykgkK04lbus5CIGdP7G4/qoxjDG2F1sBb9W?= =?us-ascii?Q?JR43vubw4fXh5qf21zdQhQBnnrNQwBi7swIvaFEUobObn2DzSumPGktKUZAN?= =?us-ascii?Q?cLcGrPDJbgkR9CMsuR+2zgT+ohE/AD5J49t2dH8iaoC+M4FZif6e7sILk9Cd?= =?us-ascii?Q?G19PonyINheVnt2f3+ymHt8PK08ZkEisGbyv9WsMO6SbZDK8w1afIQfepxC3?= =?us-ascii?Q?nuFCpxXHPXLcBwUNwXdBc6iheaIJ8xMfeKfoNTVlOojEyViQeNGNFfwMaWQZ?= =?us-ascii?Q?0cnnePgycp5iMpzyTnVKJcm+Z54FNYXWGeGYmNW2w0MsxLHhPhhlradzJlr1?= =?us-ascii?Q?9w02YFYjvlp/a5HhwcbWPV3YK2CV6U44NGmWXPpiysWa8404qp/R1pf5E+y3?= =?us-ascii?Q?tWQWyZjo4GP/Q5/Y9BVRCygIt+biOuLpylICqAO+0rpSVUEKiXpu1gguUty6?= =?us-ascii?Q?wxpdV//I2ScgHYc8bIxh0zY1Z0bU3j4y+4rFOWYjWD9JnnbedPyDVNjWjyiS?= =?us-ascii?Q?kT+Hj/pu9WBsKz3Y3KHzqeK7A4ovO/DQ+TGN4koJtq4ucIFSLSMU5Mg2Nq21?= =?us-ascii?Q?AR60SdWgsszzWNjbTpFNBk2gCOxrt8M6E03gH+VXj7Uf1zDV/uAG19fJo0D7?= =?us-ascii?Q?7XfizYocONB+lW1BOTu7wJQLXJLbEn9DCFXJrPOsjwd8DhmMUvWfgzU1Bjfs?= =?us-ascii?Q?GJJHz4vh2DGn8SPJKGROrOAORYWNacistTBYHlAeTuArwjqGqmi6XsF3N+3M?= =?us-ascii?Q?sczUoc0g6c3HbmbY4VlOQrpOHgDmASiVnB/E20cgW+3xRzHm5/X59FbnodKl?= =?us-ascii?Q?tCA/FwZsp9ufHBGCTxmcokRdeIPNJ98hYODjlieJMR48FTXK2NrHd5mgKTJ5?= =?us-ascii?Q?We0EcIJM8dXdKPxZ2KMJxPwAE1/WwxdpTtr89jXSkOqIkhx3BKLu6O0e9kkr?= =?us-ascii?Q?/LW3Cnemm07Y+m2hWbec1JFxzMNLbWP5ubRlz6obxRhJw3Sy2ZwwiNduZqJn?= =?us-ascii?Q?pqQgU/BsffTKAotezQFkWnABprpuODV1wrFiCSScc0Vz2goz2T/6oOUbzPDF?= =?us-ascii?Q?/ZJ07/yIKw1ku6bjOnWwMmSYQLdUGFNxxfN4937/9lFWDp2JmWtRgvSAZXhK?= =?us-ascii?Q?35uCjwOF1Q99iXymAEZWX5ZhHbW52wKxwbY+xaOROvDDJlNh7x4uNJU979Yy?= =?us-ascii?Q?0z7m/nF7XG0NkfG0r5h4HkqnRPy/854ObJVa3ovjdQ2ji+FzRTAH2phDTqOz?= =?us-ascii?Q?mPZu4eOFqSkeitEBtXlRb9RbeyeiBWiEhPZa9EKqyRNWITL/bUO/5QC8LM7l?= =?us-ascii?Q?hsN6izJIpKQKSV0H/ikokHrMLwSNml2M7Mn17iwFdWJy/Gk?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2284; 5:VutnMtWsxGnaZDXxo0vRe9eOgnonDenM4GLQ6onv1gqiZiNMooealYqku4TvvAcguqmBiU6DWFD8dmionla6LSZy/8d71NH4gmHPv/SiECa2TdEtkz9Rj8KTTwf3HOCwliKqbsaIHmVMJJXxpvfXrleJCV4Z7UFWov6zwv+IzJKMhchv/0yBZR9b3CoAedym; 24:rL+nI/vwJZplNeRpZlKZBEHTCV6dA4H1tHZV3r1rjoRN6NI1JGOK1fvOEPGsdrax4XHQackInMSAnmHGpu4gZ5riKBSJEqY6dsE6oV6V3gg=; 7:b5YXrhDWmCsxwXd8B2hfrd5xrDMRqhgSuDwLh3Z6MnrN6lNbsIPvoVeyxwqq3iWbBC1g4CpLseOIVCIZ9jDi6V8KjOn0vQT4pZd0vQu7x4QqgL6KMZHWKmm76i0Mub8ZQ/lp1REe8Vp+OZs8yHknbQzzvmbeLcrvp2GKMcdywyYSj/lsD+dVrNLc+dfs5XfSMjKtxtT/e7zWs8PPW12S+w==; 20:6nbjqP/b/PcnWlrC1SuBeZDuI3phTTHzvVIpYkhDDDk6PS6dKgcEFtyb1tS5g3o6mGjBswP+i/nDZaohXu16pVB0IWLYOs3yYp5Tjpl0DqXGbVRl6M+lBDZRlQuAmBrr6p3BL99tUk18GUA0004FyC4GoX6GcSONsUj1EZHZ6dg= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 15:29:07.6867 (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: CY1PR03MB2284 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 This patch adds the power supply alarms of the hwmon framework to the Arria10 System Resource chip. Signed-off-by: Thor Thayer --- drivers/hwmon/Kconfig | 9 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/altera-a10sr-hwmon.c | 215 ++++++++++++++++++++++++++++++++++++ 3 files changed, 225 insertions(+) create mode 100644 drivers/hwmon/altera-a10sr-hwmon.c diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index ff94007..af08846 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -248,6 +248,15 @@ config SENSORS_ADT7475 This driver can also be build as a module. If so, the module will be called adt7475. +config SENSORS_ALTERA_A10SR + bool "Altera Arria10 System Status" + depends on MFD_ALTERA_A10SR + help + If you say yes here you get support for the power ready status + for the Arria10's external power supplies on the Arria10 DevKit. + These values are read over the SPI bus from the Arria10 System + Resource chip. + config SENSORS_ASC7621 tristate "Andigilog aSC7621" depends on I2C diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 2ef5b7c..17d72a7 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -43,6 +43,7 @@ obj-$(CONFIG_SENSORS_ADT7411) += adt7411.o obj-$(CONFIG_SENSORS_ADT7462) += adt7462.o obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o obj-$(CONFIG_SENSORS_ADT7475) += adt7475.o +obj-$(CONFIG_SENSORS_ALTERA_A10SR) += altera-a10sr-hwmon.o obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o diff --git a/drivers/hwmon/altera-a10sr-hwmon.c b/drivers/hwmon/altera-a10sr-hwmon.c new file mode 100644 index 0000000..1eecc6b --- /dev/null +++ b/drivers/hwmon/altera-a10sr-hwmon.c @@ -0,0 +1,215 @@ +/* + * 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 . + * + * HW Monitor driver for Altera Arria10 MAX5 System Resource Chip + * Adapted from DA9052 + */ + +#include +#include +#include +#include +#include + +#define ALTR_A10SR_1V0_BIT_POS ALTR_A10SR_PG1_1V0_SHIFT +#define ALTR_A10SR_0V95_BIT_POS ALTR_A10SR_PG1_0V95_SHIFT +#define ALTR_A10SR_0V9_BIT_POS ALTR_A10SR_PG1_0V9_SHIFT +#define ALTR_A10SR_10V_BIT_POS ALTR_A10SR_PG1_10V_SHIFT +#define ALTR_A10SR_5V0_BIT_POS ALTR_A10SR_PG1_5V0_SHIFT +#define ALTR_A10SR_3V3_BIT_POS ALTR_A10SR_PG1_3V3_SHIFT +#define ALTR_A10SR_2V5_BIT_POS ALTR_A10SR_PG1_2V5_SHIFT +#define ALTR_A10SR_1V8_BIT_POS ALTR_A10SR_PG1_1V8_SHIFT +#define ALTR_A10SR_OP_FLAG_BIT_POS ALTR_A10SR_PG1_OP_FLAG_SHIFT +/* 2nd register needs an offset of 8 to get to 2nd register */ +#define ALTR_A10SR_FBC2MP_BIT_POS (8 + ALTR_A10SR_PG2_FBC2MP_SHIFT) +#define ALTR_A10SR_FAC2MP_BIT_POS (8 + ALTR_A10SR_PG2_FAC2MP_SHIFT) +#define ALTR_A10SR_FMCBVADJ_BIT_POS (8 + ALTR_A10SR_PG2_FMCBVADJ_SHIFT) +#define ALTR_A10SR_FMCAVADJ_BIT_POS (8 + ALTR_A10SR_PG2_FMCAVADJ_SHIFT) +#define ALTR_A10SR_HL_VDDQ_BIT_POS (8 + ALTR_A10SR_PG2_HL_VDDQ_SHIFT) +#define ALTR_A10SR_HL_VDD_BIT_POS (8 + ALTR_A10SR_PG2_HL_VDD_SHIFT) +#define ALTR_A10SR_HL_HPS_BIT_POS (8 + ALTR_A10SR_PG2_HL_HPS_SHIFT) +#define ALTR_A10SR_HPS_BIT_POS (8 + ALTR_A10SR_PG2_HPS_SHIFT) +/* 3rd register needs an offset of 16 to get to 3rd register */ +#define ALTR_A10SR_10V_FAIL_BIT_POS (16 + ALTR_A10SR_PG3_10V_FAIL_SHIFT) +#define ALTR_A10SR_FAM2C_BIT_POS (16 + ALTR_A10SR_PG3_FAM2C_SHIFT) + +/** + * struct altr_a10sr_hwmon - Altera Max5 HWMON device private data structure + * @device: hwmon class. + * @regmap: the regmap from the parent device. + */ +struct altr_a10sr_hwmon { + struct device *class_device; + struct regmap *regmap; +}; + +static ssize_t altr_a10sr_read_status(struct device *dev, + struct device_attribute *devattr, + char *buf) +{ + struct altr_a10sr_hwmon *hwmon = dev_get_drvdata(dev); + int val, ret, index = to_sensor_dev_attr(devattr)->index; + int mask = ALTR_A10SR_REG_BIT_MASK(index); + unsigned char reg = ALTR_A10SR_PWR_GOOD1_REG + + ALTR_A10SR_REG_OFFSET(index); + + ret = regmap_read(hwmon->regmap, reg, &val); + if (ret < 0) + return ret; + + return sprintf(buf, "%d\n", !!(~val & mask)); +} + +static ssize_t altr_a10sr_hwmon_show_name(struct device *dev, + struct device_attribute *devattr, + char *buf) +{ + return sprintf(buf, "altr_a10sr\n"); +} + +/* First Power Good Register Bits */ +static SENSOR_DEVICE_ATTR(1v0_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_1V0_BIT_POS); +static SENSOR_DEVICE_ATTR(0v95_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_0V95_BIT_POS); +static SENSOR_DEVICE_ATTR(0v9_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_0V9_BIT_POS); +static SENSOR_DEVICE_ATTR(5v0_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_5V0_BIT_POS); +static SENSOR_DEVICE_ATTR(3v3_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_3V3_BIT_POS); +static SENSOR_DEVICE_ATTR(2v5_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_2V5_BIT_POS); +static SENSOR_DEVICE_ATTR(1v8_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_1V8_BIT_POS); +static SENSOR_DEVICE_ATTR(opflag_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_OP_FLAG_BIT_POS); +/* Second Power Good Register Bits */ +static SENSOR_DEVICE_ATTR(fbc2mp_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_FBC2MP_BIT_POS); +static SENSOR_DEVICE_ATTR(fac2mp_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_FAC2MP_BIT_POS); +static SENSOR_DEVICE_ATTR(fmcbvadj_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_FMCBVADJ_BIT_POS); +static SENSOR_DEVICE_ATTR(fmcavadj_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_FMCAVADJ_BIT_POS); +static SENSOR_DEVICE_ATTR(hl_vddq_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_HL_VDDQ_BIT_POS); +static SENSOR_DEVICE_ATTR(hl_vdd_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_HL_VDD_BIT_POS); +static SENSOR_DEVICE_ATTR(hlhps_vdd_alarm, S_IRUGO, altr_a10sr_read_status, + NULL, ALTR_A10SR_HL_HPS_BIT_POS); +static SENSOR_DEVICE_ATTR(hps_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_HPS_BIT_POS); +/* Third Power Good Register Bits */ +static SENSOR_DEVICE_ATTR(10v_alarm, S_IRUGO, altr_a10sr_read_status, + NULL, ALTR_A10SR_10V_FAIL_BIT_POS); +static SENSOR_DEVICE_ATTR(fam2c_alarm, S_IRUGO, altr_a10sr_read_status, NULL, + ALTR_A10SR_FAM2C_BIT_POS); + +static DEVICE_ATTR(name, S_IRUGO, altr_a10sr_hwmon_show_name, NULL); + +static struct attribute *altr_a10sr_attr[] = { + &dev_attr_name.attr, + /* First Power Good Register */ + &sensor_dev_attr_opflag_alarm.dev_attr.attr, + &sensor_dev_attr_1v8_alarm.dev_attr.attr, + &sensor_dev_attr_2v5_alarm.dev_attr.attr, + &sensor_dev_attr_1v0_alarm.dev_attr.attr, + &sensor_dev_attr_3v3_alarm.dev_attr.attr, + &sensor_dev_attr_5v0_alarm.dev_attr.attr, + &sensor_dev_attr_0v9_alarm.dev_attr.attr, + &sensor_dev_attr_0v95_alarm.dev_attr.attr, + /* Second Power Good Register */ + &sensor_dev_attr_hps_alarm.dev_attr.attr, + &sensor_dev_attr_hlhps_vdd_alarm.dev_attr.attr, + &sensor_dev_attr_hl_vdd_alarm.dev_attr.attr, + &sensor_dev_attr_hl_vddq_alarm.dev_attr.attr, + &sensor_dev_attr_fmcavadj_alarm.dev_attr.attr, + &sensor_dev_attr_fmcbvadj_alarm.dev_attr.attr, + &sensor_dev_attr_fac2mp_alarm.dev_attr.attr, + &sensor_dev_attr_fbc2mp_alarm.dev_attr.attr, + /* Third Power Good Register */ + &sensor_dev_attr_10v_alarm.dev_attr.attr, + &sensor_dev_attr_fam2c_alarm.dev_attr.attr, + NULL +}; + +static const struct attribute_group altr_a10sr_attr_group = { + .attrs = altr_a10sr_attr +}; + +static int altr_a10sr_hwmon_probe(struct platform_device *pdev) +{ + struct altr_a10sr_hwmon *hwmon; + int ret; + struct altr_a10sr *a10sr = dev_get_drvdata(pdev->dev.parent); + + hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); + if (!hwmon) + return -ENOMEM; + + hwmon->regmap = a10sr->regmap; + + platform_set_drvdata(pdev, hwmon); + + ret = sysfs_create_group(&pdev->dev.kobj, &altr_a10sr_attr_group); + if (ret) + goto err_mem; + + hwmon->class_device = hwmon_device_register(&pdev->dev); + if (IS_ERR(hwmon->class_device)) { + ret = PTR_ERR(hwmon->class_device); + goto err_sysfs; + } + + return 0; + +err_sysfs: + sysfs_remove_group(&pdev->dev.kobj, &altr_a10sr_attr_group); +err_mem: + return ret; +} + +static int altr_a10sr_hwmon_remove(struct platform_device *pdev) +{ + struct altr_a10sr_hwmon *hwmon = platform_get_drvdata(pdev); + + hwmon_device_unregister(hwmon->class_device); + sysfs_remove_group(&pdev->dev.kobj, &altr_a10sr_attr_group); + + return 0; +} + +static const struct of_device_id altr_a10sr_hwmon_of_match[] = { + { .compatible = "altr,a10sr-hwmon" }, + { }, +}; +MODULE_DEVICE_TABLE(of, altr_a10sr_hwmon_of_match); + +static struct platform_driver altr_a10sr_hwmon_driver = { + .probe = altr_a10sr_hwmon_probe, + .remove = altr_a10sr_hwmon_remove, + .driver = { + .name = "altr_a10sr_hwmon", + .of_match_table = of_match_ptr(altr_a10sr_hwmon_of_match), + }, +}; + +module_platform_driver(altr_a10sr_hwmon_driver); + +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Thor Thayer "); +MODULE_DESCRIPTION("HW Monitor driver for Altera Arria10 System Resource Chip");