From patchwork Tue Nov 19 22:33:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13880609 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28BFB1D31BE for ; Tue, 19 Nov 2024 22:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732055645; cv=none; b=VQokQ88llyp97bLJwkRiJs2tHv2LbTsGfunw8nIxyIZTg7xAh/BVuw28Iw/OrXnzFvsbYbPOqTcYiulBu+Z2JhOGX0t5aad7B6mT+oNuFg6DyyVGkh9cXCTgdoXquyvqQPB3oVohIIkSfISPTFfDwyQJ48YlNE36s+l/Ca+HNJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732055645; c=relaxed/simple; bh=xo+f+Z/MbbmZhDhS+LV9xI5/rsuToR9buhsVAmftXS4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Dq7Gbz2op+mR3wEslJ5FEmIuKJeWdTzAPgsgRv1GjRzaXN10DoL5NLZf04KNSSH+/l+WCxAIh/GPUrip6PD01SaQDCmI/DaNGqQEkUSHVrl4LvDzdYVSXbvV1PY1CUHKHEWr1Ph0jX9o7a5BGQHJTidGmvJzytZkJayUWirfssg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tDWnF-0002gF-78; Tue, 19 Nov 2024 23:33:57 +0100 From: Marco Felsch Date: Tue, 19 Nov 2024 23:33:51 +0100 Subject: [PATCH 2/5] firmware_loader: add support to handle FW_UPLOAD_ERR_SKIP Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241119-v6-10-topic-touchscreen-axiom-v1-2-6124925b9718@pengutronix.de> References: <20241119-v6-10-topic-touchscreen-axiom-v1-0-6124925b9718@pengutronix.de> In-Reply-To: <20241119-v6-10-topic-touchscreen-axiom-v1-0-6124925b9718@pengutronix.de> To: Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Kamel Bouhara , Marco Felsch , Henrik Rydberg , Danilo Krummrich Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, kernel@pengutronix.de, Marco Felsch X-Mailer: b4 0.14.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-input@vger.kernel.org It's no error if a driver indicates that the firmware is already up-to-date and the update can be skipped. Signed-off-by: Marco Felsch --- drivers/base/firmware_loader/sysfs_upload.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c index b3cbe5b156e3..44f3d8fa5e64 100644 --- a/drivers/base/firmware_loader/sysfs_upload.c +++ b/drivers/base/firmware_loader/sysfs_upload.c @@ -174,6 +174,10 @@ static void fw_upload_main(struct work_struct *work) fw_upload_update_progress(fwlp, FW_UPLOAD_PROG_PREPARING); ret = fwlp->ops->prepare(fwl, fwlp->data, fwlp->remaining_size); if (ret != FW_UPLOAD_ERR_NONE) { + if (ret == FW_UPLOAD_ERR_SKIP) { + dev_info(fw_dev, "firmware already up-to-date, skip update\n"); + ret = FW_UPLOAD_ERR_NONE; + } fw_upload_set_error(fwlp, ret); goto putdev_exit; }