From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 816851EFDB9; Fri, 18 Nov 2016 04:20:10 -0500 (EST) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) by befuddled.reisers.ca (Postfix) with ESMTPS id E27F11EFD9F for ; Fri, 18 Nov 2016 04:20:08 -0500 (EST) Received: by mail-it0-x22f.google.com with SMTP id l8so18481308iti.1 for ; Fri, 18 Nov 2016 01:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=P99HuS+hudRK3m+WUJRxLPKUdI2VeTghrm8nSxLjsXI=; b=VUstB8Hzu/iTvZM2E+WieRVUkRfcvscQeoecJmWAJVoBipHCP8fwQhkEX4eV6jwILl hzFDoWP4QnzVOyaTefV/9Bkfs6hVw8Sv/2ucoVs6lCiMn66Fbk5mSPYSXqcpj3xnMHmC PZUMJp4DaROGVtwtqsfXvFIMvMHJwA8T74juDAc5+t1jLeQswUkLf57ZSvnzepnV/W8K llwDMdnLNgqywL5BatH9JPJeII9wPOgjnpinqrdbpvkILvFYGGKGcSKg5Ic3sPMoTLpv xZaIhUvJVPwmxNBFI0qtyePmjlSCG3GioZwjyTs5uOcnqVsD5cKi9aCsXj+HEYAySrz6 SaRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=P99HuS+hudRK3m+WUJRxLPKUdI2VeTghrm8nSxLjsXI=; b=CIYzTSy2C7gCqWl/0gfar2pOvSXAmE7IKG6p9zxFm621o0fsoqncZBJr4WPHrlkLyd /3Q+8VT9BuTQfi36n/d8huqt+B6wsFH/xQtYFNO5tihub5SyPw/S6kaxFGluvl235oJw vfTYtQSDLhyfuLGuT2wzyUNv0uKBGi9l0XyAM6EoUtF0Z27cvF3wHb7Y5tV8GUjnINmS hwxAkk+73I3l/DdjrVrO0fK0Sh2m8sdAo4dnnDJCFoD4CNrctL8yHNHp2tjHHEthPJ+d Nw9rHBNCmSJp8nNZ83guCEW+aRfvgixcKpaLYO9Xe5zJGwsdhU2IJY9wPZ4wTWpLJaXK Bwog== X-Gm-Message-State: AKaTC02tlsyFi4iujWGozaY44RJKbtJg8tvSFiG0xZCgjFuin1EirzuIIImFVRdIuw0xapdm/ryCayP1xO2ZBA== X-Received: by 10.107.128.194 with SMTP id k63mr7654661ioi.223.1479460808390; Fri, 18 Nov 2016 01:20:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.25.65 with HTTP; Fri, 18 Nov 2016 01:20:08 -0800 (PST) In-Reply-To: <20161118074407.GA6256@var.labri.fr> References: <20161118074407.GA6256@var.labri.fr> From: Okash Khawaja Date: Fri, 18 Nov 2016 09:20:08 +0000 Message-ID: Subject: Re: Serial: Initial refactor To: Samuel Thibault Cc: John Covici , David Borowski , "Speakup is a screen review system for Linux." X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 09:20:10 -0000 Cool. So we start with spk_serial_out() by replacing it with a wrapper wherever it is used in speakup_dummy? For first pass, here's what I am thinking (from your suggestion but using uglier function names which parallel existing ones): - add spk_serial_out2() wrapper which delegates to spk_serial_out() - add spk_synth_flush2() which is same as spk_synth_flush() but calls spk_serial_out2() instead - add spk_do_catch_up2() which is same as spk_do_catch_up() but calls spk_serial_out2() instead - in speakup_dummy replace calls to above functions with their *2() alternative Is that fine? Thanks, Okash On Fri, Nov 18, 2016 at 7:44 AM, Samuel Thibault < samuel.thibault@ens-lyon.org> wrote: > Okash Khawaja, on Fri 18 Nov 2016 07:07:33 +0000, wrote: > > "You will notice calls to spk_serial_out() in spk_do_catch_up() and > > spk_synth_flush(). Actually the very first step of your work could be > > to add a serial_out() method to drivers, which for now would be set > > to spk_serial_out() in all drivers, and make spk_do_catch_up() and > > spk_synth_flush() call the method instead of spk_serial_out(). Direct > > calls to spk_serial_out() within drivers could be converted into calling > > the method too, so that switching methods will be trivial." > > > > So I am wondering if it will be possible to restrict the changes to > > speakup_dummy while we test the new implementation using > tty->ops->write? That > > means a transitional phase where we have both, the existing serial io > for other > > drivers and new implementation for dummy driver. Or is that what you > meant? > > That's what I meant :) > > Samuel >