Samsung to buy part of British electronics firm