Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp247050lqp; Tue, 11 Jun 2024 23:27:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8hdo8sXs71WZ1tBYCgQ0AQh+UtGjZlqC3YZk4f6zVHZVLdYuuJ29xAuK6N1hvxTz3CuK2os0lVoPLyE6sklgmQwaEu/n/IZ1GLGfalQ== X-Google-Smtp-Source: AGHT+IHyiuYR5KlT2A9WVob/+PDk57vsARhO8qJoyi99ahJnraDxMrH+On9iVpTs5z2YWV9wpmqm X-Received: by 2002:a05:6a21:27a7:b0:1b7:a9d4:f4e1 with SMTP id adf61e73a8af0-1b86bc48bb2mr5333289637.5.1718173668755; Tue, 11 Jun 2024 23:27:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718173668; cv=pass; d=google.com; s=arc-20160816; b=yjVjoC1+5RxdK9nD81mDKsCGFihnSdqilhbRGiaXEbfifKkafpfTCp3qs9Rp2vomjQ hB+zP/5wK3oErolupMap6jznAtyuUrWYyhtLV+sjFvcbEz3b95j7f+rFD8lgaCKm7UH3 D5mXQ9/7oNV6xZmQx/KqollRUrTCzwU4TvmxF0C7RSjnVOzcvUtY99JuqEILTHQ8PaPR t8c6zqN5nkxZn7zWoVhLsJnmtcNwGex6DKRem/RwR+wPtHqXjSTjyhm2FKHTTTFvoWwH GibkcY//0UBWH3zntsOsAU65GqlcGkcOiCXgWKZ68EaJtrZvO2lx/yoVlbXBiXT1BxF2 5N3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ph//an9KLVePk2KwqDtuMz+FSS/eN6hkzoecmcL3H9g=; fh=f5yvYz/a/wbkXHuC5ORrmjL5xWwo5PjncghJkiNCsNA=; b=Dx6G8x18LHpJyciQctMpKZhpAX1eQdQAzjKxaSJerk+GGYGhVvZvwRfAqjxgtui6z/ Q9Jz3xnxTgrQw+2K+Z0PwUnCmPZDd3mySyN6T/kAzuZkOMTUhUw1xF41qXN5eJwPOtnN 6jzLE5AAxtJsVt2WaqZP+Q9IPvMyrI48IUpRmpXfudDWG0+riJo8pNE/xGPUPz7odACT Uq2/FyjXzTLesmoLRtJzBvlJ/lSq2YOrDGMGpSUXrEzxJDo/hyGakQUkVRpS3fiISYi5 lpUgxJ4WQLoENTK3nvbJS4nCnyZjMqIom/KYl9ynWirg0oJsgzXbZubXrPvguExWUz61 lSCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WgDEVnwC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210977-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210977-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de219775afsi10783448a12.214.2024.06.11.23.27.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 23:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210977-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WgDEVnwC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210977-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210977-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3AFA8285625 for ; Wed, 12 Jun 2024 06:27:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FA31168C37; Wed, 12 Jun 2024 06:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WgDEVnwC" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C19562135A; Wed, 12 Jun 2024 06:27:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718173649; cv=none; b=ISV1I8R6Nt+LkdCLm9zG0e+5Vzkd6j/9JHjE7BMSdBDSeGkYHCO0FtdakFDHg4/E9bQ5h4otnqVqU3xXbugl0pNt/RTfDJ5q5Q068fQbR1YDtILPscaFR02zbuXuQ75Ra8VtbGDTQ/At1H9WaQ27Bcxipk7uUO17IDbNUAr+wPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718173649; c=relaxed/simple; bh=1o7QKvF1Unm8odLYa5VE+NAxXl1A/eOwVf8+HDls9LA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p4ZIKIAgWpLN+RA41+anpXmk9E1G4zaPehZ/UWlro2DDZeoZvKGAjIYms1utcoIBNFSr0Q2UiZqOta0miJ4cM6s1f9m0ZgelZWNScnTdzYTucIYAZkT7FIBqQygqGVCMjs2kC4EgYC9cbIhifrfeskK30aGcQGd+Cp0maSfO+TQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WgDEVnwC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D44FC32786; Wed, 12 Jun 2024 06:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718173649; bh=1o7QKvF1Unm8odLYa5VE+NAxXl1A/eOwVf8+HDls9LA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WgDEVnwCFJooSXfI0OKC0SUAtIv8D6P4smJsAFQkte1ST+X0kK0ygyuhJ2QsXOG44 qJujIResqBEmp8EfxvkqWO552iLqr4VheJzLlrlWTeanQ8KB/VAsUluNZLsATwvAIm PmdiawDmN5QXy6hPAdh/HuVwwRKT6/BlsmmI+ucvOopqo64j8P3evo6K6PGkkH8OKS umwUF2yE3c0uypx66dPuZfUDwyXz4CLlBG9e8ssfsJvh4PqGeU7P/esigRAbK5jpVE CQGMtwaV0JQ5is3ZSM5Mr+Rw6Vuie2PGYnUNRLozuHdAWvZLi9TQyoEj5Go5YbScvT BE+P66d6u5q4w== Date: Wed, 12 Jun 2024 06:27:26 +0000 From: Tzung-Bi Shih To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Benson Leung , Guenter Roeck , linux-pwm@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] pwm: cros-ec: Simplify device tree xlation Message-ID: References: <20240607084416.897777-5-u.kleine-koenig@baylibre.com> <20240607084416.897777-7-u.kleine-koenig@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240607084416.897777-7-u.kleine-koenig@baylibre.com> On Fri, Jun 07, 2024 at 10:44:16AM +0200, Uwe Kleine-K?nig wrote: > The cros-ec device tree binding only uses #pwm-cells = <1>, and so there > is no period provided in the device tree. Up to now this was handled by > hardcoding the period to the only supported value in the custom xlate > callback. Apart from that, the default xlate callback (i.e. > of_pwm_xlate_with_flags()) handles this just fine (and better, e.g. by > checking args->args_count >= 1 before accessing args->args[0]). > > To simplify make use of of_pwm_xlate_with_flags(), drop the custom > callback and provide the default period in .probe() already. > > Apart from simplifying the driver this also drops the last non-core user > of pwm_request_from_chip() and so makes further simplifications > possible. > > Signed-off-by: Uwe Kleine-K?nig Reviewed-by: Tzung-Bi Shih