From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Phil Reid <preid@electromag.com.au>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [PATCH v3 2/4] staging: fbtft: Replace custom ->reset() with generic one Date: Wed, 28 Apr 2021 16:04:13 +0300 [thread overview] Message-ID: <20210428130415.55406-3-andriy.shevchenko@linux.intel.com> (raw) In-Reply-To: <20210428130415.55406-1-andriy.shevchenko@linux.intel.com> 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. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- 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 b545c2ca80a4..207d578547cd 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, 1); - udelay(20); - gpiod_set_value(par->gpio.reset, 0); - 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
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Phil Reid <preid@electromag.com.au>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [PATCH v3 2/4] staging: fbtft: Replace custom ->reset() with generic one Date: Wed, 28 Apr 2021 16:04:13 +0300 [thread overview] Message-ID: <20210428130415.55406-3-andriy.shevchenko@linux.intel.com> (raw) In-Reply-To: <20210428130415.55406-1-andriy.shevchenko@linux.intel.com> 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. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- 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 b545c2ca80a4..207d578547cd 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, 1); - udelay(20); - gpiod_set_value(par->gpio.reset, 0); - 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-04-28 13:04 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-28 13:04 [PATCH v3 0/4] staging: fbtft: Fixing GPIO handling issues Andy Shevchenko 2021-04-28 13:04 ` Andy Shevchenko 2021-04-28 13:04 ` [PATCH v3 1/4] staging: fbtft: Rectify GPIO handling Andy Shevchenko 2021-04-28 13:04 ` Andy Shevchenko 2021-05-03 16:38 ` Greg Kroah-Hartman 2021-05-03 16:38 ` Greg Kroah-Hartman 2021-05-03 17:08 ` Andy Shevchenko 2021-05-03 17:08 ` Andy Shevchenko 2021-04-28 13:04 ` Andy Shevchenko [this message] 2021-04-28 13:04 ` [PATCH v3 2/4] staging: fbtft: Replace custom ->reset() with generic one Andy Shevchenko 2021-04-28 13:04 ` [PATCH v3 3/4] staging: fbtft: Don't spam logs when probe is deferred Andy Shevchenko 2021-04-28 13:04 ` Andy Shevchenko 2021-04-29 14:42 ` Dan Carpenter 2021-04-29 14:42 ` Dan Carpenter 2021-04-29 15:40 ` Dan Carpenter 2021-04-29 15:40 ` Dan Carpenter 2021-04-29 16:56 ` Andy Shevchenko 2021-04-29 16:56 ` Andy Shevchenko 2021-04-28 13:04 ` [PATCH v3 4/4] staging: fbtft: Update TODO Andy Shevchenko 2021-04-28 13:04 ` Andy Shevchenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210428130415.55406-3-andriy.shevchenko@linux.intel.com \ --to=andriy.shevchenko@linux.intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-staging@lists.linux.dev \ --cc=preid@electromag.com.au \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.