Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp15346lqp; Fri, 12 Apr 2024 09:15:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwVOa+Fvg+XTbNOfDcaMYHYZs7I3+PDYRXsyNvM137/ZCTzxU73cVoXu0PTYDsXZt2q0mFif6VQ8ANO+A8aavZlXvpKXQ2t6VCZ7lQQA== X-Google-Smtp-Source: AGHT+IHTD4hSesRKj/fp/fBYMCGL9is8kLlPYa/nu5+kT21S5x8JrH0wXOeb1syZmq3AvXt3iCGG X-Received: by 2002:a17:906:6a01:b0:a4e:4e76:5fc7 with SMTP id qw1-20020a1709066a0100b00a4e4e765fc7mr3174787ejc.65.1712938531162; Fri, 12 Apr 2024 09:15:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712938531; cv=pass; d=google.com; s=arc-20160816; b=HRPPjSwmW0pn0krfPwGloNVYG/i1I2wSwqIclMl0MDbRt57mWapF83bfOaEH8cDWoo /EacPBpDLZ9ggZchZjv0906xN9JQcptNxW0A3phIvy3i8FoGN+pVH42vXfMIRGFIqjWm c5exBEWMJFgkl+nTyp6TSDKkLSO9lHZ2I1d5pXhK53lc0aYZspQsfLHIYu4uzcjJApli tYFg9MscsbAbdXPZvk7fp2ZPZPofvVrc9vpKT1V6dv90cPqdoTkgNuS1pWPLOoDJW6x7 Ow6Pge6fhizcum1B6BO9Xn5MwgBIh9iKhBcfPyfak00KyMTBwgeVY8oxObLtkiOQHw63 U16w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ivR2Ic0cD7FuWmGOAXsbIi+DzwoWJiyJ4vHNayMkqy4=; fh=VniCFi/FK2vSex1S75BcpOy8YIvRgcBvi+TeV/DGJEo=; b=h86daRg7Gvrx9acTUfkD8bGsbSK7Z4Q3agO6Ef+C3y4GWQ51EAg9XEYJGPpoLwWfoS 55THd8LkTK5aZu0S0TzkUX8wtO/lMfImX2rILc/sblDQ1wItaWUl4JmmnXyDl2POgU3r PrX6cu5ODWTroS1QiKJuFv0ezC+aNA+PpQ36DUZvhW2RiPj8WEhrR6w6yahip1DIntgi SZ4oVPIpL9dfa37dThRU/U6myBWsPi+z8LbnO5BCS18K74BrN153ZKnsG0FexfrjJ8xE 58RH4URs+E99Pw4zvfPqdmgPAWhzJu/XiHtfM/aLBwHOyeaVK8yf4WyXYhH4If2/zx7v VOow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MlZCXcez; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-143033-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143033-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hd38-20020a17090796a600b00a51902ba103si1882867ejc.534.2024.04.12.09.15.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 09:15:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143033-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MlZCXcez; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-143033-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143033-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D75AA1F22CF0 for ; Fri, 12 Apr 2024 16:15:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93B14148FF1; Fri, 12 Apr 2024 16:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MlZCXcez" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 2D9B61487F6; Fri, 12 Apr 2024 16:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712938518; cv=none; b=SasC4JdA1hI9l02dgpFVLUM6VMp6F4R5+SBZXZeEEGsfie4xGzax8J7Zh+8eppO/5XQB+t0MTdYjnsWzDO0Cwrstltk6TEvlmaVicJG6IYyseWi2xvITJJzmqikGQeyGnX1Ktba0AycLgpGhg2Qs6SgH3abg6AmLmeULkE4h808= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712938518; c=relaxed/simple; bh=V1ce7pLVJkYNy1H2D56NR0dfAzQf/796KsVr4ABO0B8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XkNAF6ca78ANEg7EZZ3D6ATLpftm++bAb98YKkPJ+URGMII8/8IPuTXlRTMbLFoJm+0kUlwWoLBrT1C1hzzp13jMQxH3K0TsaitK7xWX3W6CWHe8AUl7XobWqXOat2+2q/Njn7Jj7GrBeOnKdaOCWXuaPGih/58dHRCZInwy4CY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MlZCXcez; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712938517; x=1744474517; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=V1ce7pLVJkYNy1H2D56NR0dfAzQf/796KsVr4ABO0B8=; b=MlZCXcezFAoN/UcTunjpI0bcg//EiSUDR2+RiY99cn7lH0gbZn/bSLNx Oskgmrot2m2tkuVbbO6E6gmEiuIE3rcoNvYIBE2877g0sJAXb13dxOmJk p4j+ch4hifdOsLg0ijpO4/LoG8OlFWJAKfWA4R+EWoP8e1URCWw4MHRsf STGeC2Qr/lhp5EXktMCsLg8rzELu4dni/nVTnHgUYcayGGNVRejedPSGU 4D8YlfLComMGuBbKcrwroW4GsHZ0ki+UHRh4X4+AZ4q8orpUu1dQKf3a8 U5ekhEGI/9Ik4FXc+gsRgu1whQQ6u9Bm8w3qYhUtiyvzExrVGxUGcRes1 Q==; X-CSE-ConnectionGUID: fddpKE/XQ0KpixAwDo0T3g== X-CSE-MsgGUID: VnE+YxcRRD+VzrP1d1FngA== X-IronPort-AV: E=McAfee;i="6600,9927,11042"; a="19548224" X-IronPort-AV: E=Sophos;i="6.07,196,1708416000"; d="scan'208";a="19548224" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 09:15:16 -0700 X-CSE-ConnectionGUID: KQDw4Xd9STietWAI4ytIoA== X-CSE-MsgGUID: ud941DghRkOk2DhWFAi44w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,196,1708416000"; d="scan'208";a="21359037" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa008.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 09:15:14 -0700 Date: Fri, 12 Apr 2024 19:15:11 +0300 From: Raag Jadav To: Andy Shevchenko Cc: u.kleine-koenig@pengutronix.de, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] pwm: dwc: allow suspend/resume for 16 channels Message-ID: References: <20240412060812.20412-1-raag.jadav@intel.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=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Apr 12, 2024 at 06:35:51PM +0300, Andy Shevchenko wrote: > On Fri, Apr 12, 2024 at 11:38:12AM +0530, Raag Jadav wrote: > > With 16 channel pwm support, we're registering two instances of pwm_chip > > with 8 channels each. We need to update PM functions to use both instances > > of pwm_chip during power state transitions. > > > > Introduce struct dwc_pwm_drvdata and use it as driver_data, which will > > maintain both instances of pwm_chip along with dwc_pwm_info and allow us > > to use them inside suspend/resume handles. > > ... > > > + data = devm_kzalloc(dev, struct_size(data, chips, info->nr), GFP_KERNEL); > > + if (!data) > > + return dev_err_probe(dev, -ENOMEM, "Failed to allocate drvdata\n"); > > Haven't noticed before, but we do not print messages for -ENOMEM. Just return > the code. Any special case for -ENOMEM? I found a few drivers which still do. Raag