Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp362978pxb; Fri, 16 Apr 2021 07:32:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy65qzj514Jt+sqdnm0zVOSu0WpRgxRSpEESsCIeqp/iWiu80+spaSEOi7WnrFk7b/FZyG X-Received: by 2002:a05:6402:646:: with SMTP id u6mr10206587edx.74.1618583540280; Fri, 16 Apr 2021 07:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618583540; cv=none; d=google.com; s=arc-20160816; b=eZcAMuthx407bF7uXjtXxSdOrTnRHMN3s+tZ4zxMzJ8yr15HSXTgKmV4J+M9iikcwD XqV5OK93B74HKSWxk6GPr7R6hRTqi1el5U0OOzM4b3yFHBcmipjeyJEbvXW764PIP0MU HHOJzpeTikPC85i06C/AvJDXU6DCnezUOHjX9007ef43oD9Z+1DxZY67uoKlYiu6l9wB /dqsP3QizxPe2RVykvU0zam03B3EJdVy8AwBzBVWeV9wiIKzCunzehjR0isqqmcdWd/D EtJl1ItqqKsDylJN3JrjHtJk98qPjASo9rZsk4qDDkPTOlyhNA9lVKk5lN7N3Ziz+wAe 74dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=WNKeBQ5TUB31MIaV/57cj7daNVQpy+GhUWR/ZDdNuvY=; b=UUEnH5V4Xmx04GmkpRb1cpyn1pu2sTBWFvtlYvbr2y/7HnKylTLQTVmr3URe57W1CL in6fuV3jhwYBPyiYuAJPkO6ZevWMcGKf1MTZheLrDy7dpCkPNDBFf8Eszh8XWW91/MWH i+RMH6ejAcilhEmLZAO2+c4AJa6JgHV15z7ENEUlrFzjZySIPR5z7/+0ggo3yCknYJoA ZlRoAh9SKWimCFDTg6XF9Cxj09iwwpbV6nVmvI27jmwH0zrld2TJU4TOKGoJDs/GcPb2 x78PGEHB/Lok1MiJXQuZuJLKvUIqUalMYObKCM954UN7eFOfAJm2p0Er31feI6H332WF YJDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb13si4424850ejc.613.2021.04.16.07.31.55; Fri, 16 Apr 2021 07:32:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244616AbhDPOVL (ORCPT + 99 others); Fri, 16 Apr 2021 10:21:11 -0400 Received: from mga05.intel.com ([192.55.52.43]:58573 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244572AbhDPOVG (ORCPT ); Fri, 16 Apr 2021 10:21:06 -0400 IronPort-SDR: cFbW7orWKL2rW5S2l9NzG+cukxfC0p9/gjPDXiKPx/txQ7AbrThf5lv4Zf3OJ42t3vCl1cYH3o G4myVGGOgBSg== X-IronPort-AV: E=McAfee;i="6200,9189,9956"; a="280364116" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="280364116" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2021 07:20:41 -0700 IronPort-SDR: B7Ib3nZkSHvV9A+S3y+55TbrrjAUe0wBDXBvsv5N1anIo+a7dYHaSg6HUm7bj65D/3U4205g+5 DemFaL/Q9pbg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="522722964" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 16 Apr 2021 07:20:30 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 14D9D12A; Fri, 16 Apr 2021 17:20:46 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman Subject: [PATCH v2 1/4] fbtft: Replace custom ->reset() with generic one Date: Fri, 16 Apr 2021 17:20:41 +0300 Message-Id: <20210416142044.17766-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The custom ->reset() repeats the generic one, replace it. Note, in newer kernels the context of the function is a sleeping one, it's fine to switch over to the sleeping functions. Keeping the reset line asserted longer than 20 microseconds is also okay, it's an idling state of the hardware. Fixes: b2ebd4be6fa1 ("staging: fbtft: add fb_agm1264k-fl driver") Signed-off-by: Andy Shevchenko --- v2: new patch split from the bigger fix (Greg) drivers/staging/fbtft/fb_agm1264k-fl.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c index eeeeec97ad27..4dfc22d05a40 100644 --- a/drivers/staging/fbtft/fb_agm1264k-fl.c +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c @@ -77,19 +77,6 @@ static int init_display(struct fbtft_par *par) return 0; } -static void reset(struct fbtft_par *par) -{ - if (!par->gpio.reset) - return; - - dev_dbg(par->info->device, "%s()\n", __func__); - - gpiod_set_value(par->gpio.reset, 0); - udelay(20); - gpiod_set_value(par->gpio.reset, 1); - mdelay(120); -} - /* Check if all necessary GPIOS defined */ static int verify_gpios(struct fbtft_par *par) { @@ -439,7 +426,6 @@ static struct fbtft_display display = { .set_addr_win = set_addr_win, .verify_gpios = verify_gpios, .request_gpios_match = request_gpios_match, - .reset = reset, .write = write, .write_register = write_reg8_bus8, .write_vmem = write_vmem, -- 2.30.2