From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 677DEC76186 for ; Tue, 23 Jul 2019 17:49:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C0EE21670 for ; Tue, 23 Jul 2019 17:49:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gczom8Ma"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ke3RPY0n" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C0EE21670 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lRv8lbJI7HU9Aw7uwBzybZqCbeSSI/EiRiOY/wa9BF8=; b=gczom8MaXtqPuTWdttxrrtRPw FM4+qAau3U/Fg1YFnyPqdBG7lnrn/ZBx8Dn+ER6mFHOpshwXnOpJ9J9pMqOzi10tpKLQtT33XNy0c JRFK7GoWdN9L2CqBfUsBy0pXAlw6CeSMGn2q3lszrUecCwkMY3SkfhOU29IwBuUVRGHqR/jt+MPNC C04VxlCqPfcyW27zxZypvHuzDYHwbMLQ1c5IT9Zi42tyZYOl4qy/oHdgXVjg9EXhcG5FV2ENU8qXd 5aG2mPRNfjESS3SyD/RhAV8btkKG/orPOczyIKKGiVNN/7UZJI21xdmITP+1W9lYQhxMT1WlLWnZm 33sMSHvyg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpyuH-0000Ga-Eh; Tue, 23 Jul 2019 17:48:57 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpyuD-0000Fk-E7 for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2019 17:48:54 +0000 Received: by mail-wr1-x443.google.com with SMTP id n9so19044438wrr.4 for ; Tue, 23 Jul 2019 10:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lw64+rRIlfN9llW/JDiD/kh+iAbtqzU9FtUm2AviLUY=; b=Ke3RPY0nRkGmJqorFON4W7UvAFnkA1mTmK8gK+LxqpYaD0WyDD4gpEOy9WsiKfyMAF ckDHJKdnFRzE9HTqkBBdOaYhlR5E/tb2JQV5L+QmIyzLEeetcUt041iAxRTcIXJSssDL xFcEbyhOSfvP6/WUTcANQZ2cxsbzehXZpQnWoAK5tWbQ5+zgaoAXS2v1UG0SPhDIsv2E +sCFF9b2EcSE/6YySPLIpwiCJYhxkvkMNdD5uCxyTokdTkPN6kjFKvkoM3dpGNBCMAr9 88nNP/eTPYMxt28eJph8/yqDKWHTZUuZowGAwm0op/JW6H8FBGEAFbFPC0Hl7SD9Q5vv 0aug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lw64+rRIlfN9llW/JDiD/kh+iAbtqzU9FtUm2AviLUY=; b=TrS/p62BoVrji5nao1LVnXnEo7qBdzlVZ/NZIani1wvHdoE87vuL72NavicEK0hc21 hcVq6m7n5yLgObURfOT1yjBD4gX87h8E7K52y2IkbDEvwzgnFFESG2IHcRqDzT6J5+uB 33n6QHlgs6JSxlJm7StVORKJZO+P74w2d7jSq68+1wKlmL03mb7ptl4SUdoq4Y5zZhWv cwCz4SNZjPV1OYgnpOOe+nBHCTs/3uwv+h5KZORgMsmMD/jpeIkxF2BIZu+HbZchQK96 rtdAsHJTFJsSojUoCVNpyb4Bpm5jzCpaRPANHgzGJaH4TrLtYeP9ohfAyuQPyt5qLpcD 59jQ== X-Gm-Message-State: APjAAAXrM+qsIDjFyEm+auOeEG3xtPzPZKdntY5Ddfp3ltL1MgeY5BGP aTGRAxV6JRt6h4XPK0wnv9w= X-Google-Smtp-Source: APXvYqxdFMbhlyWIB3rurr1U5IoeuLXQYUOJJbXjUXp92CDnV3P5Zl4OeajfZDbeHqLTFBexZfqAgQ== X-Received: by 2002:a5d:4284:: with SMTP id k4mr79701010wrq.194.1563904131910; Tue, 23 Jul 2019 10:48:51 -0700 (PDT) Received: from [192.168.8.14] (nat-113.starnet.cz. [178.255.168.113]) by smtp.gmail.com with ESMTPSA id r123sm39419602wme.7.2019.07.23.10.48.50 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jul 2019 10:48:50 -0700 (PDT) From: Evgeny Kolesnikov Subject: Re: [PATCH 0/5] Add support for WD MyCloud EX2 Ultra (+ versatile UART-based restart/poweroff drivers) To: Andrew Lunn References: <20190723015631.GI8972@lunn.ch> Message-ID: Date: Tue, 23 Jul 2019 19:48:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190723015631.GI8972@lunn.ch> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190723_104853_503553_8F4BCD10 X-CRM114-Status: GOOD ( 18.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Jason Cooper , linux-pm@vger.kernel.org, Gregory Clement , linux-kernel@vger.kernel.org, Sebastian Reichel , Rob Herring , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 23/07/2019 03:56, Andrew Lunn wrote: > On Mon, Jul 22, 2019 at 09:53:00PM +0200, Evgeny Kolesnikov wrote: >> >> The difference between uart-poweroff and qnap-poweroff is small, but important: >> uart-poweroff is able to send to an MCU a command of arbitrary length, and the command >> itself is defined in a DTS file for a specific device/board, thus making this driver >> applicable to wider range of devices. > > There is a lot of replicated code here, and in the original > qnap-poweroff.c driver. Please consolidate it by extending the current > driver. It should be easy to add a new compatible string, and turn > power_off_cfg.cmd into an array. Hi, Andrew. I've considered extending qnap driver, but I have some doubts about this approach. First of all there is only a poweroff counterpart. As there is no qnap-restart driver, what should I do with uart-restart? Is it OK to have xxx-restart-poweroff driver (never saw anything like that)? While I can add cmd as a parameter to qnap driver (having it converted into an array) it should be optional as original qnap relies on two hardcoded values for its devices. And having a non-qnap device with this driver in DT without defined cmd would not make any sense. It feels kinda ugly. Wouldn't it be more fitting to have these two generic drivers and then retire old qnap driver while moving everything that uses it to the new one? Thanks for the review. EK. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel