From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760371AbcAKPd1 (ORCPT ); Mon, 11 Jan 2016 10:33:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757521AbcAKPdZ (ORCPT ); Mon, 11 Jan 2016 10:33:25 -0500 Subject: Re: [PATCH] ata: add AMD Seattle platform driver To: Brijesh Singh , Arnd Bergmann References: <1452200002-31590-1-git-send-email-brijesh.singh@amd.com> <4983521.tEaWggKCCv@wuerfel> <568F14E0.4060107@amd.com> <10869853.plxna0HzWE@wuerfel> <5690367E.8060609@amd.com> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, linux-ide@vger.kernel.org, robh+dt@kernel.org, galak@codeaurora.org, tj@kernel.org From: Mark Langsdorf Message-ID: <5693CB41.70408@redhat.com> Date: Mon, 11 Jan 2016 09:33:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5690367E.8060609@amd.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/08/2016 04:21 PM, Brijesh Singh wrote: > Hi, >> We generally don't refer to register locations with properties other than >> 'reg', so that approach would be worse. What I'd suggest you do is to >> have the sgpio registers in a separate device node, and use the LED >> binding to access it, see >> >> Documentation/devicetree/bindings/leds/common.txt >> >> It seems that none of the drivers/ata/ drivers use the leds interface >> today, but that can be added to libata-*.c whenever the appropriate >> properties are there. >> > > libata-*.c implements the "Enclosure management" style led messages but also has hooks > to register a custom led control callback. Since Seattle platform does not support > the "Enclosure management" registers hence ata_port_info we are setting a ATA_FLAG_EM | ATA_FLAG_SW_ACIVITY > to indicate that we can still handle the led messages by our registered callback. I see > that sata_highbank driver is doing something similar. The sata_highbank driver is doing it wrong and shouldn't have been accepted in its current condition. Enclosure management really should be a separate device. Please don't use it as an example. --Mark Langsdorf