Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4691C64ED8 for ; Fri, 24 Feb 2023 10:53:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbjBXKxq (ORCPT ); Fri, 24 Feb 2023 05:53:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbjBXKxZ (ORCPT ); Fri, 24 Feb 2023 05:53:25 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA3C55678A for ; Fri, 24 Feb 2023 02:53:21 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id t25-20020a1c7719000000b003eb052cc5ccso1401752wmi.4 for ; Fri, 24 Feb 2023 02:53:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=znlB4r6XgBnVvoPNdtfBl1Kal49FRfFG/+7iFF5NYGM=; b=CahmQVC0rEX2m1jIBvE6lKSxFcwQU1naGbPwl5uJTZm/xt3OVS5j+dFDUEAE5bI47D y7OTTOaRAVxAKM9Xc3WS0vgDoD/4QOvQZbmgi1+3CSkfBn5PCTxvhYxZinzQjHjkcSwH vrZzACVqhT1DZBwONy84w3W6wIMbfNenvSdCOUy80uEhX7AxuFey85ZNEqb217X16kgu snf2uDewRFFP4pp8CMj7t3sQddZx7XlxFfryOIbFMRIZUIVXpnNXbLGcpd+nIEC94N1i cMaSmABnB0x+SYcjEiGRpfSjdC4/r+dxeC67BrywGgLvNYKhPCAng9bk+onkcJguS/Zj HEfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=znlB4r6XgBnVvoPNdtfBl1Kal49FRfFG/+7iFF5NYGM=; b=FUdEhUwvDaXi1dwos69GSlF1COqnAMSn8iyX1W7p7fi537iz/Ks00yy7Udl8pLyyty uPP4HaechOSVG/GGm5KPXwHFw7PJMCwhjdj8NLLiG9ZU8sA+4oOphbw7L1MzujLaRziP heJBuSUTAlKh473c+/uzpnjuZ7gX3INLsRYn7DmOW02I51DSdzDAvIQbSPqi4uDh44lW yyFJU4YzR8FNZiBD311l8djevulXSJIbao55qJh9H6IZF20fNY1CeLQTn42kIuC33eMn BlN5fM45Fnf+ct/8fZWsPOgMRA369UG13E3IEY99RW9haoZd74KtLOET+dft+hG/OLpm rsgQ== X-Gm-Message-State: AO0yUKXTvrHjY/6qfNyRuULYqH4rpSCCREePYBltZpKibU85SmpAO8Ue gZsq0ehihIDJUUDzU+RJqfljTK0QtKYyFEySWTGjHg== X-Google-Smtp-Source: AK7set+zOA8EjyMhKkZVWtfwPH0x6BD+VAP4kHCLJYaqtwjn3LBX11LdH2RvdSQmmQorzU2SLOOhUBwb1opCmFKAC98= X-Received: by 2002:a05:600c:3ba7:b0:3e2:98f:1d76 with SMTP id n39-20020a05600c3ba700b003e2098f1d76mr1152618wms.8.1677236000306; Fri, 24 Feb 2023 02:53:20 -0800 (PST) MIME-Version: 1.0 References: <20230219183059.1029525-1-xiang.ye@intel.com> <20230219183059.1029525-6-xiang.ye@intel.com> In-Reply-To: <20230219183059.1029525-6-xiang.ye@intel.com> From: Linus Walleij Date: Fri, 24 Feb 2023 11:53:08 +0100 Message-ID: Subject: Re: [PATCH 5/5] Documentation: Add ABI doc for attributes of LJCA device To: Ye Xiang Cc: Lee Jones , Wolfram Sang , Tyrone Ting , Mark Brown , Bartosz Golaszewski , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-gpio@vger.kernel.org, srinivas.pandruvada@intel.com, heikki.krogerus@linux.intel.com, andriy.shevchenko@linux.intel.com, sakari.ailus@linux.intel.com, zhifeng.wang@intel.com, wentong.wu@intel.com, lixu.zhang@intel.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ye, thanks for your patch! On Sun, Feb 19, 2023 at 7:31 PM Ye Xiang wrote: > Add sysfs attributes Documentation entries for LJCA device > > Signed-off-by: Ye Xiang (...) > +What: /sys/bus/usb/.../cmd > +Date: July 2023 > +KernelVersion: 6.4 > +Contact: Ye Xiang > +Description: > + Commands supported by LJCA device. > + When read, it will return valid commands. > + When write with a command, it will execute the command. > + Valid commands are [dfu, reset, debug] > + dfu: Force LJCA device to enter DFU mode. > + reset: Trigger soft reset for LJCA device. > + debug: Enable debug logging. Given that there are kernel drivers for this device, it looks pretty dangerous to make it possible for userspace to reset the device? But maybe it will re-enumerate when you do this so all drivers unload cleanly and then re-probe? I guess the DFU mode will use the USB standard class for updating the firmware? Perhaps a short blurb on the use case for each string could be helpful, like "echo dfu to this file so as to put the device into DFU mode so the firmware can be updated". Is the idea that e.g. fwupdmgr should provide a front-end for this? Yours, Linus Walleij